Page 1 of 1

GC Alloc when using a Evaluate Graph as an Update Service Node

Posted: 2025/05/25 18:30
by FunctionOverflu
Logic Toolkit version: 1.10.1
Unity: 6000.1.2f1
How to reproduce:

1. Create a logic behaviour in an empty scene
2. Create a Evaluate Graph in the logic editor that does nothing
3. Use the newly created Evaluate Graph as an action run by a Service Node with Methods set to OnUpdate
4. Spot the allocation every frame in the profiler
Hierarchy_Profiler.png
Hierarchy_Profiler.png (98 KiB) Viewed 9260 times
ServiceNodeUpdate.png
ServiceNodeUpdate.png (40.69 KiB) Viewed 9260 times

Re: GC Alloc when using a Evaluate Graph as an Update Service Node

Posted: 2025/05/25 23:02
by caitsithware
Thank you for reporting this.

I checked and was able to reproduce the issue.
Since it is not considered urgent, we will fix it together with other updates.

Temporary solution
  1. Open Packages/com.caitsithware.logictoolkit/Runtime/Graph/Objects/SubGraphObject.cs in a code editor
  2. Comment out the code from lines 58 to 61 as follows

    Code: Select all

    //if (pool.Count == 0)
    //{
    // s_Pools.Remove(nodeGraphData);
    //}