public override ShapeBase Clone() { HavokNavMeshShape copy = (HavokNavMeshShape)base.Clone(); copy.m_navMeshFilename = null; // don't copy the filename since it has to be unique return(copy); }
public override ShapeBase CreateShapeInstance() { HavokNavMeshShape shape = new HavokNavMeshShape("NavMesh"); shape.Position = EditorManager.Scene.CurrentShapeSpawnPosition; return(shape); }
void EditorManager_SceneChanged(object sender, SceneChangedArgs e) { if ((EditorManager.Scene == null) || (EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count == 0)) { _panel.Enabled = false; } else { _panel.Enabled = true; // If the cached nav mesh file was loaded then enable the panel controls HavokAiEditorPlugin.Shapes.HavokNavMeshShape shape = (HavokAiEditorPlugin.Shapes.HavokNavMeshShape)EditorManager.Scene.FindFirstShapeOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape), true); if (shape != null) { _panel.EnableNavMeshDependentControls(true); } } }
public override ShapeBase CreateShapeInstance() { HavokNavMeshShape shape = new HavokNavMeshShape("NavMesh"); shape.Position = EditorManager.Scene.CurrentShapeSpawnPosition; return shape; }