ScriptableObjectCollection icon indicating copy to clipboard operation
ScriptableObjectCollection copied to clipboard

Custom Folders for Collection Items

Open mgmhunt opened this issue 9 months ago • 2 comments

Rather than having all SO created under the same named folder, I'd like to have each collection use it's own folder.

That way I can name the SO items without prefix and they are grouped in different folders.

For the moment I've added to top of ScriptableObjectCollection

        public string itemFolderName = "Items";

and line 134 change to

string parentFolderPath = Path.Combine(assetPath, itemFolderName);

which allows me to set custom folder for custom Collections

    public class PlayerGameEventCollection : AtomEventCollection<PlayerGameEvent>
    {
        PlayerGameEventCollection() { itemFolderName = "Player"; }
    }

Not sure whether this will break things - presume SO are found via reference from creation?

I found one more hardcoded "Items" in the ScriptableObjectCollectionUtility which seems to have only one reference from CreateCollectionWizard.cs - so just used via Wizard and can be changed after.

Screen Shot 2024-05-18 at 17 11 26

mgmhunt avatar May 18 '24 05:05 mgmhunt