playMaker

Author Topic: Specify Game Object - Peformance?[SOLVED]  (Read 124 times)

kavery

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Specify Game Object - Peformance?[SOLVED]
« on: January 17, 2019, 12: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
« Last Edit: January 17, 2019, 11:52:23 PM by jeanfabre »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3581
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Specify Game Object - Peformance?
« Reply #1 on: January 17, 2019, 11:50:32 PM »
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).