public void Perform() { MouseCursorRayHit cursorRayHit = ObjectEraser.Get().GetMouseCursorRayHit(); if (cursorRayHit.WasAnObjectHit) { List <GameObject> objectsToErase = cursorRayHit.GetAllObjectsSortedByHitDistance(); objectsToErase = ObjectEraser.Get().FilterObjectsWhichCanBeErased(objectsToErase); if (objectsToErase.Count == 0) { return; } objectsToErase = new List <GameObject> { objectsToErase[0] }; bool eraseEntireHierarchy = !AllShortcutCombos.Instance.EraseIndividualObjects.IsActive(); if (eraseEntireHierarchy) { ObjectErase.EraseObjectHierarchiesInObjectCollection(objectsToErase); } else { ObjectErase.EraseGameObjectCollection(objectsToErase); } } }
public void Perform() { List <GameObject> gameObjectsForMassEraseOperation = ObjectEraser.Get().GetGameObjectsForMassEraseOperation(); bool eraseEntireHierarchy = !AllShortcutCombos.Instance.EraseIndividualObjects.IsActive(); if (eraseEntireHierarchy) { ObjectErase.EraseObjectHierarchiesInObjectCollection(gameObjectsForMassEraseOperation); } else { ObjectErase.EraseGameObjectCollection(gameObjectsForMassEraseOperation); } }
public static void EraseGameObjectsInAllLayers() { List <GameObject> allGameObjectsInAllLayers = ObjectLayerDatabase.Get().GetAllGameObjectsInAllLayers(); ObjectErase.EraseGameObjectCollection(allGameObjectsInAllLayers); }
public static void EraseAllGameObjectsInLayer(int objectLayer) { List <GameObject> allGameObjectsInLayer = ObjectLayerDatabase.Get().GetAllGameObjectsInLayer(objectLayer); ObjectErase.EraseGameObjectCollection(allGameObjectsInLayer); }
public static void EraseAllSelectedGameObjects() { ObjectErase.EraseGameObjectCollection(ObjectSelection.Get().GetAllSelectedGameObjects()); }