How to turn a spawned enemy ( AI ) target on player?/ Why are my Hierarchy object turn prefab then no longer hold the transform object?

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");
}