Disabling Domain Reload – MissingReferenceException when calling agent.name

NodeCanvas Forums Support Disabling Domain Reload – MissingReferenceException when calling agent.name

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #16902
    ledshok
    Participant

    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.

    Interestingly, if I change the code to simply refer to agent (instead of agent.name) I don’t get the error. If I renable Domain Reload I don’t get the error either.

    #16911
    Gavalakis
    Keymaster

    Hello,

    Hmm. This is weird. I always have domain reload disabled as well (even when developing NC for the most part). I tried replicating the issue you mentioned, but I wasn’t really able to. Can you replicate this on a simple graph and let me know how? Also please let me know what version you are using. Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #16915
    ledshok
    Participant

    Yes, I’ve created a simple test project (with only NC and a couple of classes) and replicated the issue. What’s the easiest way to get it to you (and what folders should I include)?

    Package Manager tells me I’m on NodeCanvas v3.2.6, and Unity is v2022.3.0f (LTS).

    #16916
    ledshok
    Participant

    Here it is attached with just the Library folder removed (which I believe isn’t needed).

    #16918
    Gavalakis
    Keymaster

    Please don’t publicly distribute files including NodeCanvas … I deleted the attachment.
    I will look into it and let you know.

    Join us on Discord: https://discord.gg/97q2Rjh

    #16919
    ledshok
    Participant

    Oh sorry! I didn’t even think. Apologies.

    #17063
    ledshok
    Participant

    Did you get anywhere with the investigation?

    #17065
    Gavalakis
    Keymaster

    Hello there,
    I think there is something missing from the reproduction project you’ve sent because clicking the button does not actually fire up any events (I presume it is supposed to? ). Can you double-check and let me know? If you want to send me any files please do so to support_AT_paradoxnotion.com

    Join us on Discord: https://discord.gg/97q2Rjh

    #17070
    ledshok
    Participant

    Sent.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.