I regularly use Unity with Domain Reload disabled under Project Settings. Normally this speeds up entering play mode with no obvious downside.
However, I added the following code within a custom ConditionTask:
Debug.Log($”Agent: {agent.name}”);
and I now get the following error (after entering play mode and hitting that line of code, stopping play mode, and entering play mode a second time and hitting the same line of code again):
MissingReferenceException: The object of type ‘FSMOwner’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Hello. Hmm. There shouldn’t be any problems with Domain Reload disabled (I have it disabled all the time when developling NodeCanvas to support this) and there are lot of tasks that already use the ‘agent’ property of course. Under which method do you use that code? Is that in OnCheck?