- Home /
Instantiating a prefab that is in my project folder?
Dunno if this is a dumb question and am I missing something obvious....
So far in my limited work with UNI I declare a public GameObject in a c# script and drop into it a prefab (that I have created in the Project tab). I can now instantiate that prefab in my running game.
But can I instantiate a prefab that only exists in my project tab? What would be the c# code to find the prefab? Could I use the 'tag' to find a game object that is in the Projects tab?
Answer by DBar · Aug 21, 2014 at 05:57 AM
Put the prefabs in Resources Folder if you want Multiplayer somewhere along the road.
Answer by pacific00 · Aug 21, 2014 at 05:59 AM
put tat prefab into Resources folder(create one , under assets folder) then use Resources.Load to load it into prefab variable,then you could instantiate it ..
Your answer
Follow this Question
Related Questions
Reinitialize prefab 0 Answers
How to save/load references to components and prefabs 1 Answer
Determine if game object is tyoepf One Prefab 3 Answers
Check if GameObjects are from the same prefab? 1 Answer
Find specific prefab in a list 2 Answers