How to get 'OnGraphSerialized' event

NodeCanvas Forums General Discussion How to get 'OnGraphSerialized' event

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

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

    Attachments:
    You must be logged in to view attached files.
    #12956
    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.

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

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

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

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

    #13024
    shi377034
    Participant

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

    Attachments:
    You must be logged in to view attached files.
    #13031
    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!

    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.