playMaker

Author Topic: Check for prefab instance  (Read 1182 times)

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Check for prefab instance
« on: November 07, 2013, 12:56:07 AM »
Hi,
How can I check if an array maker list contains an instance of a prefab?
Visit my portfolio: http://www.yanivcahoua.com/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15496
  • Official Playmaker Support
Re: Check for prefab instance
« Reply #1 on: November 07, 2013, 01:54:42 AM »
Hi,

You could use name conventions, go trhough each items, and compare names with a reference, Else ask the instance itself, using a special Fsm on the prefab that holds a reference to the prefab, for example a string or an int. Using the action "Get Fsm int", you can query an expected Fsm by name and an expected var by name too, it's VERY, VERY powerful as if it's not there it will not create any errors.

 Bye,

 Jean