Question by
JHarrison1 · May 06, 2020 at 12:53 PM ·
propertiesinstances
Am I referencing properties of an instanced game object correctly?
EnemyKnights = GameObject.Find("AI_Knight"); KnightNavMeshAgent = EnemyKnights.GetComponent();
if (EnemyKnights == GameObject.Find("AI_Knight"))
{
KnightNavMeshAgent = EnemyKnights.GetComponent<NavMeshAgent>();
}
if (EnemyKnights != GameObject.Find("AI_Knight"))
{
KnightNavMeshAgent = null;
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612233441im_/https://answers.unity.com/themes/thub/images/avi.jpg)