Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: mathius777 on July 19, 2013, 03:42:12 PM
-
Hey. I was wondering if it was possible to load a prefab by name in PM. I have a bunch of tiled "rooms" that are saved as prefabs(room001,room002,etc). I would like to load roomxxx when a trigger is touched, but I don't see any way to load a prefab in this way. The closest thing is of course Load Level, but then I would have to make everything a scene and worry about transferring global objects between scene loads. Any ideas? Thank you.
-
In the actionbrowser you can find in the tab GameObject create object .
I think that is what you are looking for
-
I think you'll need the Resources Load action here:
http://hutonggames.com/playmakerforum/index.php?topic=3916.msg19807#msg19807
This should let you load a resource by name, store it in a GameObject variable, then use Create Object to spawn it.