Reply To: Task Initialization

Forums 💬 NodeCanvas 🗨️ General Discussion Task Initialization Reply To: Task Initialization

#13619
Gavalakis
Keymaster

    Hello!

    An alternative to the OnInit, which is what I used for all my tasks, you can also use OnValidate, but this is called both in editor and runtime, when the graph is loaded (as well as when the task is created or duplicated). You can however of course, do a simple check for if (Application.isPlaying) 🙂

    Please let me know if OnValidate works for you, or not.
    Thanks!