Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Volume brushes are now given nice names in the hierarchy #255

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Scripts/Brushes/PrimitiveBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine;

namespace Sabresaurus.SabreCSG
Expand Down Expand Up @@ -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:
Expand Down