All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.3.8 - 30/01/2025
- Fixed naming issue on the new Move Items context menu introduced on 2.3.7
- Renamed
Delete Item
toRemove Item
on the context menu - Updated the Confirmation for the Removal of items, now ask if you just want to remove the reference, remove the reference and delete the asset or cancel the operation
- Exposed OnEnable and OnDisable from the CollectionCustomEditor to be overriden by other editors
- Added new context menu to move items between collections
- Added new Rename context menu
- Added new CollectionItemQuery to be used with ItemPicker
- Improved Unity 6 support
- Fixed null ref when collections settings where not set
- Fixed some renaming issues
- Changed event where non automatically loaded items are removed on editor simulation
- Fixed null ref on empty collection
- Updated ListView to allow for multiple selection
- Updated Context Menu functionality to support multiple selection (Copy/Paste/Duplicate/Delete)
- Added
ApplyModifiedProperties()
to property drawers again, since was causing issues with the shareable picker. This was removed on 2.3.4
- Update PickerPropertyDrawer to use PopupList from property path cache to avoid issue when rendered inside a List/Array
- Update CollectionRegistry to search for the ScriptableObjectCollection using the
AssetDatabase.FindAssets
instead of theTypeCache
first - Added confirmation popup for deleting items from the Collection
- Fixed issue while renaming one asset could be canceled on arrow keys press
- Fix removing wrong usages of ApplyModifiedProperties
- Fixed issue with the CollectionItemPicker not updating the collection properly on editor mode
- Fixed issue with check if a collection could be partial not working, and newly created collections were not being generated as partial
- Updated the Reload of collections when entering Edit Mode to only load collections that have been removed.
- Added new plus button for
ItemPicker
allowing you to add new items to the collection from the Drawer itself.
- Removed old
itemsGuids
that was marked as obsolete since last year. If you are upgrading from an older version, please update to a previous version before upgrading to 2.3.3.
- Small cleanups and fixes
- Added tooltip for the Generate Addressables Method toggle
- Changed the Save method for the SOCSettings to be less expensive
- Fixed issue when the Addressables Settings haven't been created yet
- Organized Methods/Properties on the Collection
- Bumped minimum supported version to 2022.2
- Added Addressables support again, now you if addressables is available on your project and the collection is set to non auto loaded, and the collection is set to use addressables, will write some helper code on the static file to load the collectiom from the addressables.
- Added a Addressables Sample project as well
- Added Reset Settings context menu option
- Added the Write Addressable Loading Methods toggle for the collection
- Updated the visuals of the CollectionEditor again, make it a bit tighter and more readable
- Refactored the settings again (sorry, some settings will be lost again) to make the system more extensible and easier to maintain, settings are now stored inside the .meta files, so it can be versioned but also keep changes between projects
- Refactored CollectionCustomEditor to use UI Elements, getting rid of multiple hacks to make it work with the IMGUI and Reorderable list
- Updated the visuals of the Collection Editor
- Advanced Options are now exposed by default, giving more clarify of what is going on
- Removed the editor only assets from the Collection (
generateAsPartialClass
,generateAsBaseClass
,generateAsStaticClass
), those are not stored on the SOCSettings file and versioned - The
guid
,items
andautomaticallyLoaded
are nowHideInInspector
on the Collection, to avoid confusion - Added new USS and UXML files to the Collection Editor
- Generated static files now contains the default
.g.cs
postfix - If you set your Default Folder for Generated Files to null on the settings, it will now use the same folder as the original collection .cs files.
- If you now set your namespace to empty on the settings, it will now use the same namespace as the original collection .cs files.
- Add new Context Menu on the Collection to generate the indirect file for the collection
- Fixed GoTo button not working on the PropertyDrawer, now will probably select the collection and expand only the item you want.
- Added new Default Inspector session to the Collection Editor, where you can see the default inspector of the collection and expose more items there.
- Collections now can be enforced to use Indirect Reference, this will show an error message if the collection is not using Indirect Reference
- Settings will not be automatically converted to the new SOCSettings file, settings like (custom namespace, filename, or target folder) so you have to reconfigure those settings manually
- Added Item Order Protection. Override the
ShouldProtectItemOrder
property in your Collection to disallow items being dragged or deleted.
- Fixed SOC Item property drawers not working in certain Unity versions by @RoyTheunissen in #141
[SOCItemEditorOptions]
now has the option to limit the displayed items to the collection selected in a given field using the ConstrainToCollectionField parameter.[SOCItemEditorOptions]
now has the option to fire a callback when a value is selected using the OnSelectCallbackMethod parameter.- Replaced the implementation of the
[DidReloadScripts]
by theAssetPostprocessor
to deal with importing errors on newer unity version - Fixed issue where trying to add new custom items to a collection was not showing the create custom type properly
- Fixed Collection Picker wrong intiialization on a cold registry
- Fixing Collection Picker not respecting children rules
- Fix drawing go to button on null items.
- Update active editor when selecting a new item with the keyboard
- Scriptable Object Browser window
- Fixed scripts folder validation warning showing incorrectly when mirroring folder
- Fixed namespaces ending with dot
- Introducing Generators (thanks @RoyTheunissen). The overall idea is to make it simple to generate Collection Items based on other rules, for instance Unity Scenes, Unity Tags, Layers and anything else you want,check the help wiki about how to use it: https://github.com/brunomikoski/ScriptableObjectCollection/wiki/Generators
- Ability to define if a class can be reordered/add/remove items by the collection
- A few other helpers for creating SOCItems dynamically
- Editor serialization issues with new drawing methods.
- Added sorting options for collections
- Added option to make the collection not reorderable
- Fixed issue with post processing and recent imported files
- Fixed a small typo in the package description.
- Since 2.0.3 the collection now uses the Editor for drawing the items on the collection, but this can cause some issues depending of how customized it is inside a ReorderableList, so you now can choose the item to use it or not by toggling the
Use Custom Editor
inside the advanced settings - Upgraded the
CollectionCustomEditor
to useBaseEditor
- Updated
CollectionItemPicker<>
to useIndirectReference<>
to store the items, since also contains theLongGuid
reference to the Collection, allowing to work with multiple collections of the same time (It should automatically upgrade to the new version automatically) - Added ability to compare
CollectionItemPicker<>
to aIList<>
of the same type - Other small fixes and improvements
- Moved
EditorPreference
to Runtime folder. It is safe and useful to be able to use it in runtime code.
- Added
IsValid()
method for indirect references - Added more checks and logs for when regenerating guids and cleaning bad items from collection
- Fixed issue with
CollectionItemPicker
not respecting base type as the starting type - Removed the
Application.isPlaying
check for when setting items dirt
- Unused
ScriptableObjectForPreferences
- Reverted the change where the
isExpanded
property would be shared between the collection editor and the property drawer. - Renamed
ObjectType
toTObjectType
to keep standardized - Added
TryGetItemByName
for theScriptableObjectCollection.cs
- Added extra safety methods for checking duplicated
Guids
on collections and collection items - Properly implemented
CollectionItemPicker
IEnumerator<TItemType> GetEnumerator()
- Added boolean check for static generated files to improve performance
- Changed settings to be stored on ProjectSettings folder and be shared by subversion
- Fixed
CollectionItemPickerPropertyDrawer
to support multiple collections of the same type - Other small optimizations and code formatting
- Collection now uses the appropriated Editor for each CollectionItem when displayed on the Collection
- Fixed expanded state not being saved on the Collection
- Fixed editor only icons causing issue when the project recompiles during playmode.
- Added option to disable automatically reloading of collection on the CollectionRegistry
- Updated Labels from
CollectionItemPicker
to use black as the default interface - Added some helpers to help project upgrade
- Added
[DrawAsSOCItem]
attribute to allow drawing of customScriptableObjec
that implementsISOCItem
as a CollectionItem, this is only necessary for unity versions bellow 2022, should not affect anything else. - Syncronize Assets button on the Collection will also perform a reload of the collection
- Refactored
CollectionItemPicker
to only useLongGUID
and also the PropertyDrawer has been remade, now looks nicer 🤩 - Added multiple helpers to
CollectionItemPicker
to be used more like a label system/ - Added
ISOCColorizedItem
to allow coloring of theCollectionItemPicker
on the inspector, I will expand this to other areas as well.
- Fixed issue with name parser that would still treat digits as string and added to the final name
- Fixed issue with PropertyDrawer of indirect reference without attribute would cause a null reference
- Refactored the system to use ScriptableObject as a base class instead of
ScriptableObjectCollectionItem
now anyScriptableObject
can be used as a collection item as long as implements theISCOItem
interface - Fixed issue with
CollectionItemPicker
that would not work properly withScriptableObject
that are not in the same assembly as theScriptableObjectCollection
- Added new buttons on CollectionRegistry to force guid validation on all items
- Reduced automatic collection guid reloading to reduce performance impact on larger projects
- Fixed issues with target scripts generation folder not being saved properly
- Minimum supported Unity version is now 2021 (I'm DONE with 2020, its the worst unity ever 😒)
- Removed support for Addressables, it was not working properly and it was not being used by a lot of teams, I think the addressables support should be handled elsewhere.
- If you used the Addressables integration
SOC_ADDRESSABLES_SUPPORT
be extra careful when upgrading - The old string based guid system has been replaced for a lighter version
LongGuid
- If you are using IndirectReferences all the references will be lost, you will need to re-set them
- Update the package
- Make sure you click on the
CollectionRegistry
and click on theValidate Collections
button - Regenerate all your Static Code Files
- Initial string search support
- Fixed issue with namespace not been updated on first usage
- Implemented the new
CollectionItemPicker<ItemType>
that act as a[Flag]
enum, on the inspector and is a List under the hood. Thanks @RoyTheunissen for the contribution
- Issue where the type was not properly loaded when used as a
IList
- Fixed Compiler Warning
- Fixed another nullreference on
GetCollectionItemHeight
- Fixed
NullReference
onCheckForKeyboardShortcuts()
- Fixed reserved names C# names using
IgnoreCase
for comparison, now you can use reserved name as UpperCase - Now static generated classes will use the
cached
naming prefix, to avoid issues with reserved C# variables names - Fixed remaining Warning.
- Fixed namespace settings not been stored properly after changing once on the Wizard
- Fixed
NullReference
on GetItemHeight()
- Automatically define namespace for static collection generated file based on
CollectionItem
- Fixed static static file generation to use
Type.FullName
instead ofType.Name
- Fixed compatibility issues with Unity 2021
- Fixed Wizard settings been shared between multiple projects
- Fixed non editor builds issue
- Added new Collection References, useful for individual collection loading, more information here thanks a lot @IkeikeP for the contribution
- Fixed
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
issue with unity 2021 and generics.
- Fix issue where entering in playmode with a missing collection reference in the CollectionRegistry would throw a nullref and not reload collections
- Added new condition to consider an item as a "Bad Item" and for it to be cleared. This fixed an edge case where a collection can have a non existing item but it is not being cleared out from the collection
- Added validation method as an
CollectionItemEditorOptions
option, you can now define a method to validate what CollectionItem can appear, like this:
[SerializeField, CollectionItemEditorOptions(ValidateMethod = nameof(IsValidConsumable))]
private Consumable onlyUnlockedHardCurrency;
public bool IsValidConsumable(Consumable consumable)
{
if (consumable is HardCurrency hardCurrency)
return hardCurrency.IsUnlocked;
return true;
}
- Added
[Preseve]
attribute to bothResourceScriptableObjectSingleton
andCollectionsRegistry
to avoid AOT errors - Added check if item already exist in the collection before adding it
- Renamed uses of
Wizzard
toWizard
- Wizard foldouts now work
- The collection name is now based on the item name by default. You can still override it.
- The script folder now mirrors the Scriptable Object folder by default
- The namespace is now inferred from the script folder by default, with options for how it should be formatted. Can still manually override.
- Improved wizard readability by tweaking the layout, adding a help text, adding a scrollbar and defining a reasonable minimum size
- Settings that are serialized using Editor Prefs now use the new EditorPreference utility class
- Renamed uses of
Wizzard
toWizard
- Wizard now focuses on Item Name by default so you can type immediately
- Reformatted wizard to look more like a Unity built-in feature
- Parent folders are no longer created by default in preference to mirroring the ScriptableObject hierarchy
- ScriptableObjectCollectionUtils is no longer responsible for appending any parent directories. If you were using any of those methods, please use the recommended method instead.
- ScriptableObjectCollectionSettings.SetDefaultNamespace has been renamed. Please use SetNamespacePrefix instead.
- BREAKING CHANGE Removed Obsolete methods related to Previous Naming, if you are still on version bellow 1.5.4 consider implementing the suggested warnings before upgrading
ScriptableObjectCollection
its now abstract to avoid issues mentioned here here- Fixed partial toggle been disabled when non target generated folder is set
- Fixed issue when its not possible to read the current
ScriptableObjectItem
assembly @RoyTheunissen - Fixed a bunch of grammar mistakes on the Readme file @RoyTheunissen
- Added more information to the faq @RoyTheunissen
- Replaced TypeUtility by Unity TypeCache
- Fixed issue when a broken script between a CollectionItem is missing would cause null references on the inspector
- More display options (Hide Preview button / Hide GoTo Button) @FreezyExp
- Fixed null reference on the GoTo button on the indirect references. @FreezyExp
- Fixed warning from ResourceLoading @FreezyExp
- Fixed issue where CollectionRegistry would be stripped depending on the stripping level @FreezyExp
- More small improvements and changes (#83
- Changed the
ResourceScriptableObjectSingleton
to have generic type on methods again, to prevent AOT issues.
- Added Delete Collection button under advanced settings, I will delete all the related assets and unregister from the registry
- Renamed the
Settings
menu on the Collection Editor toAdvanced
- Fixed an issue when drawing indirect references inside arrays.
- Added
generateAsBaseClass
as an option for each collection to allow the access each Collection Item as base type.
- Added arrow navigation on the Collection Editor, now you can navigate between items and expand/collapse it by left right
- You can now expand/collapse all items by holding alt while clicking on the foldout arrow, like default unity controls
- Refactored the
ScriptableObjectCollection
Custom Editor
to useReorderableList
instead of the previous custom list drawer - Refactored the editor prefab property drawer to properly draw the
SerializedProperties
of the item instead of displaying the custom inspector - Removed some old files and methods that aren't necessary anymore.
- When using the inline visualizer of the CollectionItem, it should now respect position (if is inside an array or custom propery drawer)
- Added context click on the items, you can now Copy Paste values between collection items and Duplicate and Delete items when right click on it on the Editor
- Removed the asset destruction of the Collection on the
OnDestroy
event
- Improved the Refreshing of the
CollectionRegistry
to try to refresh when items are deleted/created - Refactored the
IndirectReference
to not need a serialized version of theCollectionItem
type, so avoid any serialization issues - Renamed some of the editor classes to match the standard
- In order to support multiple collections of the same type the check of the
Values
I had to tweak how the instance of every instance its assigned, changed for theOnEnable
of the collection item - Changed the Refresh of the collections to only find items under the same folder.
- Fixed a lot of scripts to work properly with multiple collections of the same type
- Added some logs when
CollectionItems
are added/removed from collections to help the visibility CollectionType.Values
now will return all theCollectionItem
available on the registry, so if you have 2 Collections of the one Type this will return the content of both collections while theCollectionItem.Values
when the access file is generated will only return that specific collection items
- Removed the automatically reload of CollectionRegistry using the
DidReloadScripts
callback, this caused multiple issues on batch mode and on clear libraries - Converted the
Collection
reference on theCollectionItem
to be a Lazy reference, since this was causing some dependency when usingCollectionItem
as addressables - Refactored the
ScriptableObjectSettings
this used to be a Resources object that was auto loaded, but this could also create unwanted dependencies between items. The settings for code generated are not stored inside the Collection itself. Make sure you delete theScriptableObjectsSettings
ScriptableObject inside your resources folder. - Added a bunch of validation and verification for the Generation of the static access, making sure it only allows partial classes when is possible and other small checks.
- The settings are now on the Project Preferences where you can define the default folder for the Scriptable Objects and default namespace.
- Removed the
ReadOnlyList
on theCollection
, the casting was expensive and was an unnecessary safety measure
- Disabled the reload of the collection after script reloading on batch mode.
- Deleted old .meta files
- Simplified the multiple collection display to be a single line again, showing all the available items inside the
AdvancedDropdown
- Refactored the
Collectable
forCollectionItem
this has several changes in multiple parts of the code, I tried my best to keep compability with the old version as well. - Renamed the
CollectableScriptableObject
toScriptableObjectCollectionItem
for better naming convention,CollectableScriptableObject
still exist but has the obsolete flag on it to avoid breakable changes - Add
IsValid
to IndirectReferences to check if has valid data before being used - Refactored
ResourceScriptableObjectSingleton
to fix some warnings - Fixed the
GetEnumerator
fromCollection
warning - The
CollectionRegistry
now will only load Collections that are inside an active Assembly. - Exposed the
Collections
list on the Registry - Simplified the CollectionItem Dropdown (removed the type grouping)
- A new information on the Collection custom editor to show the base class if is different from the collection type (Disabled for now)
- Exposed the namespace to be customized by the custom static file
- Added support of multiple collections of the same type on the registry, the
CollectionItemDrawer
will display a Collection dropdown if more than one collection for the same type of item is available
- Fixed issue when using the Create Settings menu
- Added automatically open of the selected collectable when using the goto button on the CollectableProperty Drawer
- Added type specific GetEnumerator for the Collection
- Added quick access to the .Values from the collection, to be used without code generation, you can now use
CustomCollection.Values
to gett all your items - Added a
GetValues()
to the generated static file, you can quickly get a filtered list of items that you need
- Changed Create Collection Wizzard to behave like a modal window that can loose focus.
- Removed the TryGet static access generation, was not been used and was causing some problems
- Automatically selection of the newly created item, for renaming
- Added keyword validation for names
- Added ability to create new items from the selection dropdown.
- Fixed issue when trying to play without the
CollectionRegistry
created
- Added basic copy/paste functionality between colelctables
- Removed multiple
AssetDatabase.SaveAssets();
to improve general performance when adding / removing objects - Fixed indirect reference issues with the new Advanced Dropdown search
- Removed static
.Values
from the Colletion, was redundant and error prone
- Advanced dropdown for better searching on big collections;
- Fixed issue with the Foldout issue, now showing multiple inherited collectables should work fine
- Improved the ADD New on the collection and what is displayed, and the the creation of new types is on a subfolder.
- Added static access to the
ScriptableObjectCollection<>.Values
- Renamed the generated Static value back to the
.Values
to keep in line with the static access. so you can now access byCollection.Values
orCollectable.Values
- Support to create Collections / Collectables based on a Utils script, useful for another packages creating the necessary Collection.
- Fixed issue when trying to create a new type from abstract using the new Collectable editor.
- Fixed issue when duplicating assets caused a crash
- Fixed issue when deleting Scripts from base Collectables
- Fixed issue of null type when creating a new collectable with base type
- Added new inspector to create new base types from the Editor.
- Fixed AOT issue.
- Fixed issue with the read only lists not refreshing properly on Inspector calls on PlayMode.
- Fixed issue where the collection view was not properly refreshing
- Fixed general warnings on the project
- Fixed double type usage on the ResourceScriptableObject
- Renamed the
Values
toCollection
on the static generated file, it makes more sense to the new Custom Static Class access
- Added a new Custom Static File to be able to generate static access files between different assemblies
- Added warning system to help displaying issues
- Not serializing editor fields
- Fix read only list not storing caching
- Fixed issue with the settings menu been displayed wrong
- Fixed an issue while converting numbers to literal numbers would not deal properly with initial special characters
- Added system to be able to Add/Remove items from the collection at runtime (Like loading new items from addressables)
- Added runtime / editor time fix to deal with dynamicly changed collections
- Fixed issues with indirect references
- Fixed issue with the wizzard that was not generating the target Scriptable Object
- New type of indirect access to collectable items, this allows you use the regular editor reference, but without storing the reference, so without creating a relationship between the items, and can be lazy loaded when is needed, like addressables references for isntance.
- Also added an option on the wizzard to automatically create the IndirectReference for every collectable item
- Fixed AOT compilation issue
- Fixed mobile builds (using editor references on runtime files)
- Proper error when there's no static script folder defined
- Default namespace on settings
- Stored the last scripts folder as cache for the wizzard
- Validation of null items on the Registry
- Changed to the static file use the Colllectable Type again
- Values on the static files now its just values not
CollectableType+Values
- Crash while changing to debug mode while having the Collection inspector open
- Fix static generation code writing the full class name as the static class name
- Fix possible stackoverflow on PostProcessor
- Removed Assembly Definition Check (Was expensive and bad when working with packages)
- Fixed issue when reloading items from the same type from different collections been added to both
- Fixed Static genearation file using sanitized name and not class name, breaking the partial class
- Fixed Create Collection context menu using the selected folder as target for both scrips and scriptable objects
- Fixed some warnings
- Fixed weird pair next name issue
- You can now set specific overwrite static files location on the
CollectionSettings
file - Settings are now displayed on the Collection itself rather than on the registry
- Fixed issue with package version
- Added support for codacy code quality
- Refactored settings
- Removed settings from the Collection script to make it clear
- Added some a way to write inside packages as well.
- Changed the Settings file to be the main place where data is stored, not using EditorPrefs anymore
- Added all the namespaces for individual assets as diretives on top of static generated file
- Fixed issue with the Add New Item missing the DelayCall on the Collection Editor Window
- Added the
[CreateAssetMenu]
to the Collection automatic generated file
- The Static file uses the Collection name instead of the collectable type, so you can have multiple collections of the same type and unique access to that specific collection
- Fixed asset creation menu name to use
ScriptableObject
instead ofScriptable Object
- Editor Group issues when adding new items throwing error
- Added support for non automatically loaded Collections, this allow you initialize collections when they are necessary, avoiding adding all the collectable references into the resources bundle
- Added
InitializeCollections
that can initialize Collection in regular MonoBehaviours - New type of script static script generation for Non automatically loaded collections
- Added new Custom Editor for the registry where you can define witch collection are auto loaded, and the static generation type
- PreProcess that removes the non automatically loaded collections before build
- General bug fixes and optimizations
- Fixed issue with the dropdown on property drawer
- Support for SubClasses support for adding new items
- Asset Modification Processor to prevent issue when deleting
Collectable
andCollections
- If you delete a
Collection
now, all theCollectables
will be deleted as well and removed from the registry
- If you delete a
- First initial working version