Any Property can be used as PersistantIndex for FSMState

Forums 💬 NodeCanvas 🗨️ General Discussion Any Property can be used as PersistantIndex for FSMState

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12948
    nicolasoto
    Participant

      I use FSM in NPC/Quest system,and I want to serialize current state data as SaveData.

      At first,I serialize FSMState UID and can find certain node by UID,but find that the UID for the same node has changed when starting game in next time.

      So,the UID for FSMState isn’t persistant but only unique in one play.

      #12949
      Gavalakis
      Keymaster

        Hello,
        Please open up Node.cs and change line #201 from this:

        to this:

        (therefore removing the commented line)

        Making this change will ensure that a UID is generated everytime and not only when it is requested. After you make this change please make sure to save your graph/project so that the generated UID is serialized.

        Please let me know if that works for you.

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