playMaker

Author Topic: Need Test GameObject Action  (Read 2494 times)

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Need Test GameObject Action
« on: October 18, 2013, 04:57:02 PM »
hi,

Please anyone can make an extension for "Find Game Object" to do something.

To be clear, I want an action that can do these actions bellow

1. Find Clone Game objects (name, tag)
2. True/Exited on screen --> Do something
3. False ---> do something.

This can be done by some actions, just lazy to do so a lot of time. I think this is really useful action.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Need Test GameObject Action
« Reply #1 on: October 18, 2013, 06:04:18 PM »
Why not just use Find Game Object and then Game Object Is Null?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Need Test GameObject Action
« Reply #2 on: October 21, 2013, 02:34:51 AM »
Hi,

 Lane is right.

 Be very cautious with finding objects by name, this is a known slow function within Unity, so use it only when you have no other choice, and certainly not in your gameloop, else you will have performance problem. Prefer pro active registrations of objects to a list or firing a global event for anymore interested to get notified that you exist.

 If you have trouble refactoring because indeed you use "find object by name" everywhere, let us know.


bye,

 Jean