Skip to content

Commit

Permalink
Update SoundCollectionInstance.Unity.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Nov 6, 2023
1 parent c6d06e1 commit 9f6eec5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ partial class SoundCollectionInstance
public void OnValidate()
{
if (collection == null) return;

string oldName = name;
name = $"{collection.name} ({bus})";
if (oldName != name) AssetDatabase.SaveAssets();

if (oldName != name)
{
EditorUtility.SetDirty(collection);
AssetDatabase.SaveAssets();
}
}

[Button("Delete Instance"), UsedImplicitly]
Expand Down

0 comments on commit 9f6eec5

Please sign in to comment.