Okay I have a few questions about prefabs and creating duplicates in script.
- I’ve made a prefab in the project tab, but does there have to be one instance of the prefab in the hierarchy?
- How do I actually find the prefab in script? All the unity manual examples show duplication of the object that the script is in, but I want to duplicate on object that does not have the script in.
- I’m supposing you set the prefab to a variable and then use Instantiate(avariable,Vector3,Quaternion.identity); Please correct me if I’m wrong.
- My object has an animation that is set to play automatically. Will duplicating it reset the animation or will it also duplicate the time in the animation that it is at? In this case I’m just supposing that I’ll have to change it to activate using script but I’d rather know ahead of time.
Thanks for any answers, sorry if this is all too much for a single question, but I feel pretty straight forward about what I need to know at this point. Sorry if I’m missing any important information, I’m still new to scripting.