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

Forums 💬 NodeCanvas ⚙️ 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
  • #17187
    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 :

      #17192
      gandi
      Participant

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

        #17191
        gandi
        Participant

          Here a video to describe the bugs:

          [video src="https://trello-attachments.s3.amazonaws.com/5b7a5bdc58445262d69378a6/5b7bc81b0a170a399d0c2c16/daef6ce771633d16a37003e37bb3cafd/NodeCanvas_Set_to_null_the_ref_objects.mp4" /]

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

          #17190
          gandi
          Participant

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

            #17189
            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.

              #17188
              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!

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