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 #90 from Henry00IS/Fix89
Browse files Browse the repository at this point in the history
Fixed that duplicated brushes stopped generating automatic names. Fixes #89.
  • Loading branch information
Henry00IS authored Apr 10, 2018
2 parents 4f42937 + f00f0dd commit c6b2bb9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Scripts/Core/BrushBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public string GeneratedHierarchyName
/// </summary>
public void UpdateGeneratedHierarchyName()
{
// this may happen after the brush is duplicated.
if (previousHierarchyName == "" && GeneratedHierarchyName == transform.name)
previousHierarchyName = transform.name;

if (transform.name == previousHierarchyName || transform.name == "")
transform.name = previousHierarchyName = GeneratedHierarchyName;
}
Expand Down

0 comments on commit c6b2bb9

Please sign in to comment.