Hi,
I have a script on a prefab which displays a GUI button. When the button is clicked it instanciates a prefab. The prefab to instantiate is a drag dropped reference on a transform parameter in the script.
This works.
However… If I want an instance (clone) of the prefab to instanciate another clone of its prefab (meaning the reference in the prefab’s script is referencing itself), I run in to a problem. When I drag the original prefab in to the scene, everything looks fine, but the when I use the UI to make an instance/clone, and look at the new clone in the inspector, the reference is no longer to the prefab, it is a self-reference to the clone in the scene.
This is a pretty simple setup, but kind of hard to explain. I hope I am making sense.
My goal is to have this game object make copies of itself using the GUI Button.
My GUI code is simple. It does not set this reference anywhere in the code. Something is triggering the change, but I don’t know where to start my search. Hopefully someone here can help. In the mean-time, I’ll start stripping back my code to see if I can uncover it.
Cheers,