Forums › 💬 NodeCanvas › ⚙️ Support › [Bug] Async graph loading incompatible with object pooling? › Reply To: [Bug] Async graph loading incompatible with object pooling?
GraphOwner.cs, line 334:
Changing
if ( !isRunning && enableAction == EnableAction.EnableBehaviour ) {
To
if ( !isRunning && enableAction == EnableAction.EnableBehaviour && gameObject.activeInHierarchy ) {
Has the desired effect of not starting the graph if the GameObject is not active at the time the async load finishes. I can’t see any negative side-effects; pooling seems to work correctly as well as regular behavior.
Can you see any gotchas with this approach?