Hi Gavalakis,
I started using NC about 2 months ago ,it’s very useful for developing AI and game logic .
Now I have a problem with GC alloc.
I use many ‘get property’ actions and ‘execute function’ actions in my game.
I found that a ‘get property’ action will cause 3KB GC alloc, and an ‘execute function’ action will cause 1.2KB GC alloc.
To Test this problem ,I create a simple tree only include a ‘get property’ action and an ‘execute function’ action.
the script on the agent :
public class TestScript : MonoBehaviour
{
public int testProperty{get {return 0;} }
public void Test() {}
}
When the game is playing, profiler window show that MonoManager.Update() have 4.2KB GC alloc per frame.
If the game has 30-50 behaviour trees ,and each behaviour tree has 10-30 actions, the GC alloc can be more than 1MB per frame.It’s very terrible.
I have some leads as of what might be causing this in the “Script Control” tasks after some latest refactors I did.
Please allow me some time and I will fix it.
Please update to the latest version whenever you can. The current version is 1.5.9d.
Let me know if you still get high GC allocations and if so, please provide me some more info / graph screenshot, or even if possible a sample project where you encounter this.
Thanks
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.