Instantiating a prefab results in loss of all the references. Please Help :(
(sorta new game dev here) I need to instantiate this prefab in order to get my game working but when I drag my prefab from scene to project folder and instantiate via script
public Transform spawnpoint;
public GameObject prologue;
public void prologueClick() {
Instantiate(prologue, spawnpoint);
and click the button it appears! but the problem is that it loses some of its references.
this is my prefab when its in the scene (contains UI stuff, parent is simple game object 'prologue 1')
I drag and throw this in project box and instantiate by my script.
When I play, it loses some references I noticed that it loses only those that is not a part of it ..the other things present in the scene.
I am done trying to make the other things prefabs and parenting everthing, looking for a solution here now.
Thanks for reading :')
Your answer
Follow this Question
Related Questions
Only allowing one instance of prefab created by button press & destroying prefab on collision? 0 Answers
How to instantiate a prefab using a string variable ? 1 Answer
null reference on instantiated prefab array at instantiation 1 Answer
Making a time bomb 1 Answer
Problems with instantiated objects in a circle formation 0 Answers