Skip to content

New Processor and more QoL changes and improvements

Latest

Choose a tag to compare

@brunomikoski brunomikoski released this 06 Apr 17:30
e496352

Added

  • New SOCItemGuidProcessor asset postprocessor that enforces valid and unique GUIDs on collection items at import time, replacing the inline validation in CollectionsAssetsPostProcessor
  • Custom CollectionItemQueryPropertyDrawer with foldout UI, rule editing, match type constraint filtering, impossible-rule detection, and human-readable query summaries
  • GUID-based lookup caching for collections (CollectionsRegistry) and items (ScriptableObjectCollection) for faster retrieval
  • CollectionItemIndirectReference now caches resolved references with a hasCachedRef flag to avoid repeated resolution attempts
  • Enhanced error logging in CollectionItemPickerPropertyDrawer with last known names and property paths
  • DrawAdditionalIMGUI() extension point in CollectionCustomEditor for subclass customization
  • GitHub Copilot review instructions (.github/instructions.md)

Changed

  • Renamed CollectionItemQuery.MatchType enum values: NotAnySomeNot, NotAllNone
  • Reduced GC allocations in CollectionItemQuery.Matches() by reusing a HashSet instead of creating a new one per call (by @emtony)
  • CollectionItemDropdown now redirects to the collection when the item type has derived types, instead of immediately creating an item
  • Code generation now outputs UTF-8 without BOM and handles both \r\n and \n line endings
  • Refactored new modifier detection logic in code generation with improved base type filtering
  • CollectionItemPicker now uses reverse iteration for safe removal during enumeration
  • Refactored CollectionsRegistry.ValidateCollections() to validate items within collections using HashSets for duplicate detection
  • Improved bidirectional type assignability check in CollectionsRegistry.GetCollectionsByItemType()
  • Robust UXML asset loading in CollectionCustomEditor with error handling for missing visual tree assets

Fixed

  • ScriptableObjectCollection<T>.ClearCachedValues() now calls base.ClearCachedValues() to properly clear name/GUID lookup dictionaries
  • GUID cache lookups (TryGetItemByGUID, GetCollectionByGUID) now validate the cached entry's GUID still matches before returning, evicting stale entries
  • SOCItemGuidProcessor deleted asset handling: entries are now removed by path matching instead of attempting to load already-deleted assets
  • Removed UTF-8 BOM from SOCItemGuidProcessor.cs and its .meta file
  • Fixed typo IsKnowCollectionIsKnownCollection across multiple files
  • Fixed typo collectionLastKnowNamecollectionLastKnownName with FormerlySerializedAs for backward compatibility
  • Fixed method name SetUsingBaseClassForItemsSetUseBaseClassForItems
  • Improved null/destroyed Unity object equality checks in ScriptableObjectCollectionItem
  • Removed OnValidate() auto-GUID generation from ScriptableObjectCollectionItem (now handled by the processor)