playMaker

Author Topic: XML question  (Read 2273 times)

mweyna

  • Full Member
  • ***
  • Posts: 242
XML question
« on: January 30, 2014, 11:54:16 PM »
If I get the string variable from an XML, what's the easist way to cover it to a game object variable so I can load an appropriate pre-fab?

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: XML question
« Reply #1 on: January 31, 2014, 02:13:40 AM »
So using the FIND GAME OBJECT action, I can put the string in there, but it doesn't appear to search Prefab libraries at all. If I need to find a game object in the Prefab Folder but not the scene, how would I do that?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: XML question
« Reply #2 on: January 31, 2014, 06:44:34 AM »
Hi,

 for this, you need to "load Resource", as prefabs are not "findable" as is. They must be first in a folder "Resources", as it is a special folder for Unity, where all of its assets will be incorporated in the build, even if never used.

 and so you would simply load them as is, using the action:

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

bye,

 Jean


mweyna

  • Full Member
  • ***
  • Posts: 242
Re: XML question
« Reply #3 on: January 31, 2014, 10:45:41 AM »
Awesome, thanks!