diff --git a/Scripts/Brushes/PrimitiveBrush.cs b/Scripts/Brushes/PrimitiveBrush.cs index 09b446fb..a2a1b42a 100644 --- a/Scripts/Brushes/PrimitiveBrush.cs +++ b/Scripts/Brushes/PrimitiveBrush.cs @@ -3,6 +3,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Text.RegularExpressions; using UnityEngine; namespace Sabresaurus.SabreCSG @@ -174,6 +175,12 @@ public override string BeautifulBrushName { get { + if (volume) + { + // give volumes a nice name, where "MyTriggerVolume" becomes "My Trigger Volume" + return Regex.Replace(volume.GetType().Name, "([a-z])([A-Z])", "$1 $2"); + } + switch (brushType) { case PrimitiveBrushType.Cube: