I am not sure what I am doing wrong, but mine gives me this error:
In my code, here is what I am doing:
Thanks in advance!
I am not sure what I am doing wrong, but mine gives me this error:
In my code, here is what I am doing:
Thanks in advance!
rockHit
is the prefab. You cannot set the transform
on a prefab. You must set it on the instantiated object
var instance = Instantiate(rockHit, hitPos, Quaternion.LookRotation(Vector3.up)); // store the instance
instance.transform.parent = parent.transform; // set the transform on the instance
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.