Hi MaryE,
Welcome to our community! ![]()
NullReferenceException means that a reference (“link”) to an instance is missing. Double click on the error message to see to which line in your code it is referring.
Generally, if something solves a problem, it’s a solution by definition.
You might feel that you were the only person but you are not. A common problem with Rick’s solution is that the Destroy() method does not destroy the object immediately. We have to disable it with SetActive(false);. Otherwise, the Find* methods will still find it. That does not mean that you must disable the object, too. If you found an alternative solution, that’s fine.
That’s unlikely. Given I’m correct about what was going on in your project, the problem was caused by the fact that Destroy() does not destroy objects immediately. This has been the case for many, many years.
Did this help?
See also:
- Forum User Guides : How to mark a topic as solved