- Home /
How to find a prefab in another scene?
OK, in my game I save a gameObject in a prefab but after that it opens an other scene, an I want to create that prefab in that scene but the problem is that I don't know how to search for a prefab, but what Is different is that I am planning to create lots of prefabs with same tag, layer, etc... and know actually what object I am talking about in the other scene. So my question here would be, how to find a prefab in another scene? Note: I am using JavaScript.
Answer by tertle · Feb 05, 2011 at 03:26 AM
A little confused on the question.
Are you trying to instantiate a prefab at runtime? If so read Instantiating Prefabs.
If you just want to put a prefab in a scene, you can just drag the prefab from Project panel.
Or if you want to transfer a object or data between 2 scenes, you can use the don't destroy on load function
Otherwise I'm not really sure what you're asking
Oh yeah thanks it really works the dontdestroyonload, really thanks