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
Login
Register
By registering on this website you agree to our Privacy Policy.