Hi all unities,
Why are my Hierarchy object turned to prefab then no longer hold the transform object I set in hierarchy window before, how to turn a spawned enemy ( AI ) targeting on player?
Please show me javascript snippet thanks.
thanks.
Hi all unities,
Why are my Hierarchy object turned to prefab then no longer hold the transform object I set in hierarchy window before, how to turn a spawned enemy ( AI ) targeting on player?
Please show me javascript snippet thanks.
thanks.
I think this should work
var target : GameObject;
function Start(){
target = GameObject.Find("Player");
}
have you tried to locate the player with a tag??
– anon98876923I guessed I fixed this particular problem just wondered why the Transform modifier cannot hold the same value as before it become a prefab... But I am done with this at this mean time...
– BSVALVE