public static void EndBpMode(bool ignoreBlueprint = false) { if (!bpMode) { return; } bpMode = false; BlueprintManager.CopyEntities(bpSelection.Keys.ToList()); foreach (var selectionGizmo in bpSelection.Values) { selectionGizmo.Close(); } bpSelection.Clear(); if (circleGizmo != null) { circleGizmo.Close(); circleGizmo = null; } if (BlueprintManager.hasData && !ignoreBlueprint) { BlueprintManager.EnterBuildModeAfterBp(); } GC.Collect(); }
public static void EndBpMode(bool ignoreBlueprint = false) { if (!bpMode) { return; } if (!ignoreBlueprint) { var ids = bpSelection.Keys.ToList(); BlueprintManager.Copy(ids, referenceId); if (BlueprintManager.hasData) { BlueprintManager.EnterBuildModeAfterBp(); } } bpMode = false; referenceId = 0; foreach (var selectionGizmo in bpSelection.Values) { selectionGizmo.Close(); } bpSelection.Clear(); if (areaSelectionGizmo != null) { areaSelectionGizmo.Close(); areaSelectionGizmo = null; } if (referenceGizmo != null) { referenceGizmo.Close(); referenceGizmo = null; } if (referenceSelectionGizmo != null) { referenceSelectionGizmo.Close(); referenceSelectionGizmo = null; } GC.Collect(); }