- Home /
Question by
Crilled · Aug 06, 2013 at 08:55 PM ·
gameobjecttransformreferencenpc
How do I use one GameObject's properties in a different GameObject's script?
I want to access the GameObject called Player inside my script for my NPC AI. I want to be able to compare the Player's transform to the NPC's transform in order to determine which direction the npc has to move. Can someone give me a quick run down in c# how to do this?
Comment
Your answer
Follow this Question
Related Questions
Why this Texture gives value of Null when I access it from other script 1 Answer
After update of Unity Editor all objects in scene lost references to any scene object. 2 Answers
How do I assign a prefab reference to a private variable? 1 Answer