How to get 'OnGraphSerialized' event

Forums 💬 NodeCanvas 🗨️ General Discussion How to get 'OnGraphSerialized' event

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13746
    shi377034
    Participant

      I need ‘currentChildGraph’ trigger Serialize to do something,but how can get ‘OnGraphSerialized’ event?

      #13751
      Gavalakis
      Keymaster

        Hello,

        Can you please provide a bit more information on what you are after and the use case?
        Do you want to get a serialization callback within some of your custom classes serialized within a graph (eg Node, Task)?

        Let me know.
        Thanks.

        #13750
        shi377034
        Participant

          Yes,I need get a serialization callback within some of custom classes serialized within a graph!For example,The ‘NestedFSMNode._nestedFSM’ was
          serialized after I will be Refresh ‘NestedFSMNode’ some Field!

          #13749
          Gavalakis
          Keymaster

            Hello again,

            That’s easy 🙂
            Just implement the UnityEngine.ISerializationCallbackReceiver to your class.
            I have made it so that the ISerializationCallbackReceiver is called as normal for the types serialized within the graph 🙂

            Let me know if that works for you.
            Thanks!

            #13748
            shi377034
            Participant

              Can you give a callback? Just like Screenshots.I really need it.
              Thanks!

              #13747
              Gavalakis
              Keymaster

                Hello again,

                Can you please explain a bit more of the use case?
                Do you want a callback to the GraphOwner, or a callback to all nodes/tasks/classes within the graph and after the graph serializes and/or deserializes?
                Are you after only Serialization, or Deserialization as well?
                What is the difference you are after and by which the previously suggested solution of using ISerializationCallbackReceiver interface does not work?

                Please let me know.
                Thank you!

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