[RESOLVED]Condition and Action have the ref object set to null after play, build

NodeCanvas Forums Support [RESOLVED]Condition and Action have the ref object set to null after play, build

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13475
    gandi
    Participant

    Every time I try to play / build or reopen my project, all the conditions and actions with a reference on specific object type has been set to null.

    The GameObjects are simple transform with this script:

    Idem with my own condition :

    Attachments:
    You must be logged in to view attached files.
    #13478
    gandi
    Participant

    I use an old version of unity 2017.3.1f1 (64bit). Do you think that is the problem?

    #13479
    gandi
    Participant

    Here a video to describe the bugs:

    Remark: The last sequence it’s show what’s happen when you close and re-open the project.

    #13480
    gandi
    Participant

    THe bugs are the same with the last version of unity.

    #13481
    gandi
    Participant

    To solve it i have to bind the graph to the owner. I don’t like that because i have different instance with the same graph.
    But now it’s work.

    #13484
    Gavalakis
    Keymaster

    Hello,

    Just to clarify what is going on, it is that by Unity’s standard workflow,
    Assets (like graph assets are) can not have references to scene object.
    And this is the reason why your scene object references are lost.

    When you Bind a graph though, it stops being an asset, but is rather “saved” and thus treated as a scene object alongside the owner gameobject and that is the reason why Bound graphs are able to have scene object references.

    If you definitely want to use Asset Graphs, the way around this Unity limitation, is to utilize Blackboard Variables instead of directly referencing scene objects within the graph fields.
    Because Blackboard, is a component that is attached on the GraphOwner gameobject and is thus saved in the scene (unless of course the owner is a prefab), it IS possible for Blackboard Variables to have scene object references.

    Please let me know if this clarifies what is happening, or if you need further explanation or help 🙂
    Thanks!

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

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