- Home /
Question by
EliteUnity3D · Mar 15, 2013 at 10:37 PM ·
networkingnetworkenemy ai
Help w/Network Enemy AI(I got script already)
NullReferenceException: Object reference not set to an instance of an object Player.UpdateBot () (at Assets/Scripts/Main/Player.cs:400) Player.Update () (at Assets/Scripts/Main/Player.cs:228)
at Console^^^^
Line:
path = _LevelEditor.paths.OrderBy(a => a.walkCount).FirstOrDefault(a => Vector3.Distance(pos, a.nodes.First().position) < 20);
When in playing mode, bots seens to spawn but , not move, im able to kill them, but they do not move or shoot or do anything.
Comment
Wiki
Answer by DryTear · Apr 06, 2013 at 03:11 AM
add this onto your script:
function Awake(){
target = GameObject.FindWithTag("Player");
}