Reply To: Task Initialization

NodeCanvas Forums General Discussion Task Initialization Reply To: Task Initialization

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

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