2

Keep a long story short, ive suddenly gotten a bunch of these errors in unity when coding my game (The numbers keep going up)

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect topRect, UnityEngine.Matrix4x4 projection)

Its my first template of a much larger project, but none of my objects' scripts reference anything to do with UIElements... just UI for setting the text of an ammo counter You guys got any ideas? it doesnt affect my gameplay or my scripts it just is annoying in the console, and it happens when im not in game too. I think the amount of errors has maxed out at 35, in the time of writing this Thanks! :D

3
  • Does this answer your question? What is a NullReferenceException, and how do I fix it? Commented Nov 26, 2019 at 18:55
  • Hmmm not really... thing is i havnt referenced UIElements anywhere, unless its autogenerated in the Text component... it also seems to appear randomly. like now im fine but 5 minutes later it was happening, i woud still like to know what caused it so this isnt technically "resolved" even though the issue has gone down for me for now Commented Nov 26, 2019 at 20:34
  • Then there's likely not enough detail for anyone here to have any idea what's wrong. Commented Nov 26, 2019 at 20:40

1 Answer 1

5

You can try to delete the project's caching folder "library", this will make Unity reimport all your assets and generate new copies of intermediate DLLs.
Warning: It will take a long time to reimport all assets if your project is big.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.