playMaker

Author Topic: How to find then create prefab in scene  (Read 1959 times)

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
How to find then create prefab in scene
« on: July 02, 2013, 07:39:04 AM »
Hello,

I'm having trouble trying to create an object from a prefab. I have the string of a prefab that needs to be instantiated and tried to use "find game object" to store it to a variable so I can create it.  The problem I'm having is it can never find it unless I add it to the scene first. (because it searches for game objects and not prefabs?). Could anyone tell me how I can find the prefab and store it in a variable using a string of its name?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to find then create prefab in scene
« Reply #1 on: July 03, 2013, 02:16:25 AM »
Hi,

 "Find" only works within your scene hierarchy, not within your assets.

 For this, you need to use "load resource" custom action:

http://hutonggames.com/playmakerforum/index.php?topic=3916.msg19802#msg19802

bye

Jean