public void ComputeDebugPath() { if (UnityEditor.EditorApplication.isPlaying) { throw new Exception("Compute debuging path can only be done while in editor."); } if (navigationMesh == null) { navigationMesh = GetComponent <NavigationMesh>(); //Don't use injection in edit mode } debugPath = GetPath(debugPathStartPoint.transform.position, debugPathEndPoint.transform.position); }
protected override void Initialize() { navigationMesh = target as NavigationMesh; }
protected void Awake() { navigationMesh = this.GetComponentInObject <NavigationMesh>(); }
private void Awake() { navigationMesh = Finder.NavigationMesh; }