Skip to content

Commit dda8a84

Browse files
authored
Merge pull request #178 from brunomikoski/feature/automatic-menu-paths
Set up menu paths so they update if you rename the collection
2 parents 1ab2c91 + 5bbc635 commit dda8a84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Scripts/Editor/EditorWindows/CreateCollectionWizard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ private bool CreateCollectionScript()
639639
bool result = CodeGenerationUtility.CreateNewScript(CollectionName,
640640
folder,
641641
Namespace,
642-
$"[CreateAssetMenu(menuName = \"ScriptableObject Collection/Collections/Create {CollectionName}\", fileName = \"{CollectionName}\", order = 0)]",
642+
$"[CreateAssetMenu(menuName = \"ScriptableObject Collection/Collections/Create \" + nameof({CollectionName}), fileName = nameof({CollectionName}), order = 0)]",
643643
$"public class {CollectionName} : ScriptableObjectCollection<{collectionItemName}>",
644644
null,
645645
typeof(ScriptableObjectCollection).Namespace, "UnityEngine", "System.Collections.Generic");

0 commit comments

Comments
 (0)