Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: kavery on January 17, 2019, 02:02:38 PM

Title: Specify Game Object - Peformance?[SOLVED]
Post by: kavery on January 17, 2019, 02:02:38 PM
Kind of a general question. I attached an image of an example action. Is it slower to use direct game object input like this vs using a GO variable?

Just wondering if this method requires a game object search every time the action is used.

Thanks
Title: Re: Specify Game Object - Peformance?
Post by: Alex Chouls on January 18, 2019, 01:50:32 AM
No, the action stores a reference to the GameObject in either case, so it doesn't need to do a search. Generally, actions that do searches have "Find" in the name. These can be slower but it depends on your specific use. It's generally best to build the simplest behaviour that works, test it, and then optimize if necessary.

We will be adding some profiling tools to the PlayMaker editor soon to make it easier to spot bottlenecks (e.g., highlighting states that are taking too much time).