- Home /
 
Dragging the player to prefab
I did the script and I want to assign the Player as an target, but its unable to drag and drop player on to the prefab. But when I put the object on the scene it is possible to assign that, but I have to do it one by one(i have plenty of Enemies to assign player as a target)
     void Update () 
     {
         if (Vector3.Distance (destination, player.position) > 1.0f) 
         {
             destination = player.position;
             agent.destination = destination;
         }
 
     }
 
               
                 
                aaaaa.png 
                (87.9 kB) 
               
 
              
               Comment
              
 
               
              I tried, but the script is not going to work, even after the changes
Your answer