Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MABManZ on February 28, 2017, 06:10:41 AM

Title: How to identify an FSM in profiler?
Post by: MABManZ on February 28, 2017, 06:10:41 AM
I'm trying to squeeze out the best performance in my game, and track down issues that are causing Garbage Collection or CPU spikes.


I'm able to find the spikes in the profiler (caused by PlaymakerFSM.Update), but the culprit object will usually have multiple FSM's attached to it. It's very difficult to track down the offending FSM when it could be 1 of 10 or 20 scripts on a single object.
Title: Re: How to identify an FSM in profiler?
Post by: jeanfabre on February 28, 2017, 08:16:15 AM
Hi,

 yep, it's a pain, currently the profiler doesn't allow you to do that, even for other components.

usually, it's not the PlayMaker engine but an action that create this GC ( or the PlayMaker Editor, in which case you have to test with everything turned off for debugging, and no PlayMaker editor at all, just a Unity Layout with just the game view and the profiler).

 Bye,

 Jean
Title: Re: How to identify an FSM in profiler?
Post by: rik on February 28, 2017, 11:52:27 PM
best practice is to avoid updating some actions on every frame.
try to find which actions in your gameobject was cpu intensive and try to use alternative ones.

or best use was to use custom actions for the playmaker.