August 2018
Beginner
334 pages
10h 19m
English
We need a special component for the agents called Lurker. This class will hold the paths that are to be used later in the navigation process.
The following is the code for the Lurker class:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Lurker : MonoBehaviour
{
[HideInInspector]
public List<int> pathIds;
[HideInInspector]
public List<GameObject> pathObjs;
void Awake()
{
if (pathIds == null)
pathIds = new List<int>();
if (pathObjs == null)
pathObjs = new List<GameObject>();
}
}
Read now
Unlock full access