Hello,
I instantiate a Prefab as follows:
GameObject myBulletObj = Instantiate ((GameObject) Resources.Load("Prefabs/Bullets/AK47Bullet")) as GameObject;
myBulletObj .transform.parent = this.transform;
myBulletObj .name = this.name + " Bullet";
myBulletObj .transform.localPosition = new Vector3 (0f, 0.7f, 0.9f);
But I get the following error:
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption
Why is this?
Thanks!
...bump...
– TheDogePwner...bump...
– TheDogePwnerIt works, thank you, you're awesome :DDD
– Paul23758