Hi,
Quick intro, I’m trying to find my prefabs subcomponent called ‘Model’ and then instantiate another prefab once found with it’s rotation changed to that of the model, for me this only happens the once, not sure why…
model = GameObject.Find ("Model"); in Start () which is fine of course, I made a reference to it with a private gameobject
if (model)
Instantiate (damagePrefab, model.transform.position, model.transform.rotation);
which is fine, then boom it’s gone, one hit wonder, if I don’t have the boolean check it tells me the object has been destroyed and your still trying to access it… so basically my prefab has this subcomponent named Model which has the transform I’m interested in and I thought doing the GameObject.Find method might be one way of doing it, perhaps I need to reference the ‘model’ transform first or cache it… hmmm please advise, I’m sure it simple… but I’m hungry now, need tune sandwich, cheers