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

Commit

Permalink
Merge pull request #255 from Henry00IS/VolumeNames
Browse files Browse the repository at this point in the history
Volume brushes are now given nice names in the hierarchy
  • Loading branch information
Henry00IS authored Jun 1, 2021
2 parents 28346c6 + 53c0ae0 commit 259732b
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 259732b

Please sign in to comment.