Hello! Maybe I am wrong but there is no function for initialization that is called once when the graph is loaded for “heavy” stuff..
As OnInit() is called once first time the node is active this can produce the needed allocations or heavy stuff in the middle of the game which is not optimal.
Graph.cs
1
2
3
4
5
6
7
virtualprotectedvoidOnGraphInitialize()
{
// Add OnLoaded callback for tasks.
foreach(vartask inallTasks)
task.OnLoaded();
}
Task.cs
1
2
3
4
5
6
7
8
9
10
11
virtualprotectedstringOnInit(){returnnull;}
/// <summary>This is called once when the graph is loaded.</summary>
virtualpublicvoidOnLoaded(){}
///<summary>Called once the first time task is created</summary>
Indeed there is no call in Tasks for when the graph is initialized. I will add something for this in a future update though.
Thank you for your suggestion 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.