- Home /
How to talk about objects in the scene, not prefabs?
I'm trying to find the distance in between the player and an object, they're both prefabs. How do I talk about the actual gameObjects, not the prefabs? Here's my script:
 var player : Transform;
 
 function Update () {
 Debug.Log(Vector3.Distance(transform.position, player.position));
 
}
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
My Scene won't load in, and is stuck in "WaitForPlayEnter" 0 Answers
Asset Server Team and project management Unity Pro 2 Answers
Accessing non-static functions in an unattached, non-scene, "project" script 1 Answer
Two versions of one game on a single project 1 Answer
Scene load crashes iPod 4th gen but not iPhone 4 or 3GS 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                