Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

Parenting an instantiated Prefab?

$
0
0
I have a Spawner which I instantiate, and then try to parent with
gameObject.transform.parent = Sun.transform;

It doesn't complain about the code, but when I start the build it says that "setting the parent of a transform which resides in a prefab is disabled to prevent data corruption"

How can I solve this?

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>