Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: AyaTou on March 07, 2013, 03:41:42 AM
-
I'm getting performance hiccups whenever I instantiate an FSM.
I have a GameObject on the scene and it has an FSM component.
Then, when I use the Instantiate() method to create duplicates of that GameObject, I get noticeable performance hiccups, especially in an Android platform.
Of course the hiccup doesn't happen when I don't have the FSM in the GameObject.
Do you have any idea about what is causing this issue and how can I fix it?
-
First, make sure that you're using 1.5.4 since it fixes some slowdown introduced in 1.5. We're looking into ways to reduce FSM load time further...
In general it's always a good idea to make all the GameObjects you need at the beginning of the level, and then re-use them as needed (Show/Hide instead of Create/Destroy). Search for Object Pooling on the forums. This eliminates hitches from instanciating, and garbage collection.