PlayMaker News > General Discussion
CG.Alloc in prefabs containing FSMs instantiated at runtime
(1/1)
toddprofanegames:
Hello,
I am heavily using PlayMaker throughout my game (currently running v1.9.7), which is a large seamless world with no loading screens. All enemies have about 4 to 5 FSMs with many actions on them which handle their behavior. When the player walks over certain triggers, enemy instances are created and loaded into the world. After much optimization of my custom code, I'm finding the primary and most significant remaining bottleneck is all the heap allocations that occur in the scope of PlayMakerFSM.Awake.
I've attached a screen shot of the profiler. I'm just wondering if there are any plans to somehow make FSMs less dependent on heap-memory, although without knowing the internal workings of the code I can't really begin to guess what can be done to address this.
For the record, I can't just pool these enemies at startup, as the game is far too large to let all that data sit in memory as disabled GameObject instances for the life of the application.
Navigation
[0] Message Index
Go to full version