Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: mweyna on January 30, 2014, 11:54:16 PM

Title: XML question
Post by: mweyna 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?
Title: Re: XML question
Post by: mweyna 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?
Title: Re: XML question
Post by: jeanfabre 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

Title: Re: XML question
Post by: mweyna on January 31, 2014, 10:45:41 AM
Awesome, thanks!