Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

UnassignedReferenceException: The variable Target of AI has not been assigned [Error]

$
0
0
I was just trying to make a cube or a capsule to follow me, as a zombie game. I assigned the AI script to the cube and capsule then I made a prefab of the cube and capsule. And I cannot assign the Target to the script. The Script AI is this: #pragma strict import UnityEngine.AI; private var theAgent: NavMeshAgent; var Target: Transform; function Start () { theAgent= GetComponent.(); } function Update () { theAgent.SetDestination(Target.position); } And i cannot assign the Target when is a prefab.

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>