Global Blackboard Is Not Binding

Forums 💬 NodeCanvas 🗨️ General Discussion Global Blackboard Is Not Binding

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13252
    bonyyousuf
    Participant

      I am trying to use global blackboard variable to bind with a game object’s field. And it is not working at all. If I change the variable, the global blackboard is not updating. I always have to manually update the global blackboard from the code. All the local/regular blackboard are binding with just fine though. Can anyone tell me what is the issue here?

       

      Thanks

      #13257
      Gavalakis
      Keymaster

        Hello and happy new year.

        Are you referring to data binding? If so what do you mean by saying “change the variable” please? Do you mean changing the variable name or the variable value (the field data binding)?

        Please let me know.

        Thanks!

        #13256
        bonyyousuf
        Participant

          Hey, Happy new year man 🙂

          So what I mean is that the values of the variable in the global blackboard is not updating, if they are bound with a game object. For instance say, I have a global blackboard and I have a float variable “X” in it. This X variable is bound with a component that is on the same object. If I change the component’s value via code, I don’t see any change in the global blackboards X variable.

          Basically, no data banding is working for global blackboard while normal blackboard that is auto-added with a graph owner is perfectly binding with other components value.

          I hope this makes it clear.

          #13255
          Gavalakis
          Keymaster

            Hello again 🙂

            You are right. There is a weird behaviour when the class has [ExecuteInEditMode] (like GlobalBlackboard has) in combination with Unity’s “fast enter playmode”, where Awake apparently is not called when entering playmode. To work around this please open up GlobalBlackboard.cs and add the following line of code just after line #62 (in GlobalBlackboard.cs):

            Please let me know if that works for you.
            Thanks 🙂

            #13254
            bonyyousuf
            Participant

              Thank you so much man for figuring out that I was having this issue with “Fast Enter Playmode”. And yes, your solution is working now. Please ensure to have this line added on the next update of Nodecanvas or my changes can be overwritten by your update 🙂

              #13253
              Gavalakis
              Keymaster

                Great. Thanks for letting me know.
                Yes, this is already part of the new update live on the asset store now 🙂

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