// Use this for initialization void Start() { pos = transform.position; polyRef = steeringManager.GetClosestPolygon(pos); steeringManager.IncrNumObjectsInPolygon(polyRef); }
void Awake() { if (steeringManager != null && !steeringManager.isInitialized()) { steeringManager.Initialize(); } prevPos = transform.position; if (steeringManager != null) { polyRef = steeringManager.GetClosestPolygon(prevPos); steeringManager.IncrNumObjectsInPolygon(polyRef); } }