How can I have a member variable on a prefab point to another prefab, so that when the first prefab is instantiated, it can instantiate the second (or do any number of other things)?
I’ve tried making member variables of a bunch of random types. If the variable is Transform, I’m able to select prefabs. Other than that though, nothing worked. That would be fine if I only had a few objects, but I would like to be able to limit the scope to less than all GameObjects.
For instance, say I have a GameObject in the scene with a script attached deriving from MonoBehavior (let’s call it MyScript), and then I make a prefab of that object. Then, on a second prefab with a MonoBehavior script, there is a member variable “public MyScript scr;”. The Inspector will only allow me to select the in-scene object, not the prefab. A transform type variable let’s me select both.
Thanks for the help.