Odin Inspector Version 3.3.0.4 - Beta

Odin Inspector

Fixes

  • Fixed Odin causing a StackOverflow when drawing a UnityProperty-derived attribute which is handled by an IMGUI-based Unity DecoratorDrawer that does not use UIToolkit. This issue was introduced in Odin 3.2, and was caused by Odin's UnityDecoratorAttributeDrawer getting and iterating over the currently active drawer chain. This would reset the drawer chain, and cause it to start over drawing when CallNextDrawer is invoked, instead of advancing to the next drawer in the chain. Iterating over a BakedDrawerChain instance using GetEnumerator now uses a separate enumerator instance that does not mutate the current state of the drawer chain.
  • Dropdowns should now properly attempt to fit within the working area if a valid RectInt is provided. The issue was that Screen.mainWindowDisplayInfo.workArea provided a zeroed RectInt for the working area if the 'Game' tab was not currently open. This caused users to experience dropdowns disappearing, as the dropdown attempted to fit within a zeroed rect.

Odin Validator

Additions

  • Added the ability to change the severity of the Missing Script Validator rule.

Odin Serializer

No changes were made to Odin Serializer in this version.


Odin Inspector Version 3.3.0.3 - Beta

Odin Inspector

Fixes

  • Removed ApplyUIScaling and RevertUIScaling from RectExtensions. This fixes the Unity CIL linker fatal error issue introduced in 3.3.0.2.

Odin Validator

Fixes

  • Introduced even more safeguards in Odin Validator against invalid guids, which should resolve remaining guid-related error logs people were seeing on full reimports and initial installation of Validator.

Odin Serializer

No changes were made to Odin Serializer in this version.


Odin Inspector Version 3.3.0.2 - Beta

Odin Inspector

Fixes

  • Fixed case where issue in Odin's build pipeline caused Odin to ship with non-portable .pdb files. The included .pdb files should now be portable and work correctly across a wider range of Unity versions.
  • Fixed a field in AssetSelectorExamples causing the AssemblyUpgrader to run on the Sirenix.OdinInspector.Editor.dll file. As is often the case, Unity's AssemblyUpgrader touching anything in any capacity at all breaks the assembly's metadata and causes several import errors. With this fix, the AssemblyUpgrader should no longer run and break Odin's assemblies.
  • Fixed issue where getting a GlobalConfig instance during InitializeOnLoad, DidReloadScripts or similar load events would throw an error when the GlobalConfig asset file does not yet exist and needs to be created in the AssetDatabase. GlobalConfigs which need to create their assets now instantiate and return the config instance immediately, then delays the asset creation to a later time where it is safe to use the AssetDatabase to create asset files. This would manifest primarily as a failure of Odin's CustomEditorLoader to create its inspector config asset and thus it would fail to initialize and inject Odin's editors into Unity.
  • Changed obsolete usage of Expanded to ShowFoldout on ListDrawerSettingsAttribute in examples provided and configurations.
  • Fixed bitbucket issue #324: TableMatrix SquareCells=true does not work with array of width 1.
  • Fixed bitbucket issue #851: AssetsSelector runs off bottom of screen (2021.2+)
  • Fixed bitbucket issue #932: PersistentContextCache throws exception on save when Company Name in project settings contains a '.'
  • Fixed bitbucket issue #971: PreviewField will change filterMode(Point) when value is a RenderTexture.
  • Fixed issue in the localization support module where the LocalizationFormatter type would be included in the runtime build and cause compiler errors when Odin's editor only mode was enabled.
  • Introduced fix in Odin's property system value loading for the case where Unity creates invalidly typed, corrupt wrapper objects. IE, when Unity, for example, deserializes a GameObject reference as a Transform reference, so the Transform reference has a native pointer to a GameObject. In these cases, Odin now replaces the corrupt wrapper value with a null value before it is passed into the property system for drawing and validation.
  • Made the Polymorphic Field correctly render when a pure Unity Type is used.
  • Polymorphic Field now correctly handles displaying Missing Unity Objects.
  • Prefer Namespace is now handled correctly in the TypeSelectorDrawerSettings.
  • PropertyTrees now automatically create a SerializedObject when UnityObjects are provided without one. This fixes various edge-case issues when using PropertyTrees for Unity types manually, such as undo not working for some Unity object types like AnimationCurve.
  • The new Object Picker now correctly handles assigning Components.
  • Updated the new Object Picker to accommodate custom sorting of displayed types.
  • Very likely fixed Bitbucket issue #947 where the focused control would be changed when data is changed while an inspector is viewed, and the validation then causes issue error boxes to pop up or vanish from the inspector. As the issue is very difficult to reliable replicate, there is a chance something has slipped through somewhere. If anybody is still seeing this issue, please let us know.
  • InstantiateDefault in TypeExtensions now prefers GetUninitializedObject over constructors with non default interface(s) or abtract(s) types present in the parameters.

Improvements

  • Adjusted the Polymorphic Field to display the dropdown arrow on Unity types in more relevant scenarios.

Odin Validator

Fixes

  • Odin Validator now handles rare cases where Unity's asset database would give invalid asset guids.
  • Odin Validator now uses less memory for its internal processing and gathering of results by processing results intermittently during validation scans if too many results are building up. This should help those with truly enormous projects who were running out of memory during full project validation scans.

Odin Serializer

No changes were made to Odin Serializer in this version.


Odin Inspector Version 3.3.0.1 - Beta

Odin Inspector

Additions

  • Added FilterTypesFunction resolved string for the TypeSelectorDrawerSettings attribute, which lets you filter the types to be displayed in the Type Selector.
  • Added two new parameters to the PolymorphicFieldSettings attribute: CreateInstanceFunction, which lets you control instance creation, and OnInstanceAssigned, which gives you a callback when an instance has been created and assigned in case you want to modify it in any way.

Improvements

  • Made the Type Selector single click instead of multi-click. Control modifier is now supported; it will instantiate the first type found based on priorities set.
    General improvements to the Type Selector (Single click is selection, Control modifier support), made all the drawers support the new resolved strings

Fixes

  • Fixed Odin's Localization module causing LocalizedReferences to not work properly in the inspector while in play mode.
  • SerializationBackend.SupportsPolymorphism is now properly handled in the CollectionDrawer. This issue was causing the new type selector dropdown to be displayed when it shouldn't, when for example adding new values to a non-polymorphic Unity-serialized collection.
  • This was caused by an interaction with old code in the support module and patch 3.2's UIToolkit support.
  • Fixed NullableReferenceDrawer's picker not being able to be selected while HideLabel is set and it has properties to display in a foldout.
  • Removing items on a searchable Dictionary and TableList now removes the correct item when filtered.
  • Searchables dictionaries no longer update while being edited, to avoid values becoming null.
  • Fixed SdfIconSelector drawers opening by keyboard events even if it's not currently focused.

Odin Validator

No changes were made to Odin Validator in this version.

Odin Serializer

  • Incorporated pull request that improves JSON deserialization performance by using the Ordinal instead of Invariant culture when doing string equality comparisons.
  • Fixed issue where the AOT support scan would not be able to scan addressables due to the PlayerDataGroupSchema type having been removed from the Unity.Addressables module.

Odin Inspector Version 3.3.0 - Beta

Odin 3.3 introduces a range of new features and improvements, including:

  • A complete overhaul of the Unity.Localization package
  • A new type selector that enhances the workflow of working with interfaces and polymorphism
  • A profile section to track asset load times during validation and assets scheduled for validation
  • And many more smaller changes like important bug fixes



Localization

While Unity's localization system offers a robust framework for creating multilingual projects its accompanying tools can sometimes fall short, making the experience less than optimal. Recognizing this gap, we have developed replacements for the most important and frequently used aspects of the localization system, aimed at enhancing the existing authoring workflow.

We've tried to strike a balance between keeping the UX as familiar as possible while changing and improving the workflow where it made sense and where the old system was lacking.

Let's take a look at some of the awesome new features and improvements we've introduced.



Visual overhaul

We've developed a replacement editor for Unity's Localization Tables window that can operate alongside Unity's localization tables window but aims to completely replace its functionality. Unity's original Localization Tables window, which often felt cluttered and became increasingly challenging to navigate with the addition of more tables and entries, has been redesigned with a focus on clarity, usability, and performance. We've ensured that the interface remains intuitive and accessible, regardless of the scale of your localization data. This redesign introduces numerous helpful features, making it easier to concentrate on specific parts of your localization data.



Everything in one window

One of the key enhancements we've introduced is the consolidation of the core localization process into a single, centralized window. This allows you to manage all aspects of your localization data through one unified interface, significantly streamlining the workflow. Now, tasks such as creating, adding, and removing tables from your table collection can be accomplished directly within this window, eliminating the need to navigate through the project to locate the relevant asset.



Pinning tables

This feature enables you to pin tables to keep them always visible, ensuring they remain readily accessible while you add, modify, or compare other pieces of data. This functionality is crucial for maintaining a smooth workflow, as it simplifies referencing back to other locale entries while modifying a different one.



Isolating Tables

In addition to pinning, you now have the ability to hide specific tables, enabling a focused view on a subset of your data. This feature further declutters the interface and allows you to concentrate exclusively on the elements that are currently important, ensuring that none of the available screen real estate is occupied by irrelevant data.



Inline Access Buttons

To streamline the process further, we've integrated inline buttons that instantly open the assets within your table either in the inspector or the explorer. This eliminates the cumbersome process of manually navigating through the project to locate and modify assets, significantly speeding up the editing and updating process.



Syntax Highlighting

Syntax highlighting is now integrated into string editing by default, eliminating the need for activating a specific debug mode. Previously, the absence of syntax highlighting during editing rendered the process cumbersome and error-prone. This enhancement guarantees that you can edit your localization and identify syntax errors or inconsistencies at a glance.



Improved Metadata Inspector

We've overhauled the metadata inspector to more closely align with Unity's default component inspector, enhancing familiarity, ease of use, and legibility. Additionally, you are now able to use Odin's familiar attribute and drawer workflow to customize how your metadata is drawn. This overhaul also introduces several smaller quality-of-life features, enabling you to:

  • Search through your metadata for specific items
  • Copy and paste metadata easily
  • Expand or collapse all instances of metadata, or instances of a specific type, with a single action


Performance

Our implementation is all about elevating the user experience, with a primary focus on speed and responsiveness. Whether you're opening a Collection containing thousands of Shared Entries, editing a String Table Entry among hundreds, or efficiently handling tasks like Resizing, Sorting, and Filtering thousands of Shared Entries, we've streamlined the processes to make them feel virtually instantaneous.


Beta Phase

We are excited to receive your feedback during the beta phase. This will enable us to address critical bugs that may emerge, enhance existing features, or introduce new features that the community would like to see.

For the final release, we already have several improvements and additions in mind, including:

  • Undo Handling: We are actively exploring the development of an internal solution to enhance Undo actions, with a focus on achieving near-instantaneous Undo and Redo operations, especially when managing large Collections.

  • Localized Reference Drawer: We aim to improve the existing Localized Reference Drawer to complete the localization workflow improvements, making it less cluttered and easier to use. This improvement will also enable us to connect it to the new localization window, allowing users to open a specific localized reference and focus on it in the new window with a single click.


Revamped Type Selector and Polymorphic Fields

As updates keep rolling out to the beta, we will continuously be replacing places where the Instance Creator existed with the new Type Selector.

In this update, we're thrilled to announce a complete revamp of the Type Selector, accompanied by it's very own custom editor!

The revamped Type Selector offers enhanced responsiveness and customization. Now, you have fine control over each type's display, determining their appearance, priority, order, visibility, and validity. Additionally, we've introduced versatile customization options for the content displayed by the selector, as well as how it presents that content.

Alongside this, we're introducing support for more use-cases with polymorphic fields, coupled with a refined visual experience! This enhancement, for example, will streamline workflows that include interfaces that share both Unity and C# implementations.

The new editor window we have introduced provides a streamlined way to quickly handle how a plethora of types are displayed in the Type Selector.

Below is a demonstration showcasing the workflow of utilizing the new polymorphic fields for interfaces that have both C# and Unity implementers.

In addition to these updates, we're introducing three new attributes:

  • TypeSelectorItemSettings: Reflects the settings available in the new window for the Type Selector, in attribute form.

  • TypeSelectorDrawerSettings: Allows users to tailor the Type Selector to their needs.

  • PolymorphicFieldSettings: Provides a way to handle how the Polymorphic Fields and their content get drawn.

Below are some examples of how to utilize these new attributes!

// ShowCategories: Defines if the Type Selector should display it's content with categories when being opened.
// PreferNamespaces: Defines if non-custom categories should be namespaces or assembly categories.
// ShowNoneItem: Allows the user to hide the 'none' item in the Type Selector.
[TypeSelectorDrawerSettings(ShowCategories = true, PreferNamespaces = true, ShowNoneItem = true)]
public object Example;
	
// Name: Defines the types name in the Type Selector.
// CategoryPath: Defines the custom category for the type.
// Icon: Defines the types Icon in the Type Selector.
// Priority: Defines a numeric priority for manually sorting to appear above or below other types, default is 0.
// Icon colors can also be customized through R,G,B and A parameters for light and dark mode.
[TypeSelectorItemSettings(Name = "New Type Name", CategoryPath = "Foo/Bar", Icon = SdfIconType.CircleFill, Priority = 1)]
public class Example { }
	
// ShowBaseType: Defines if the base type should be displayed in the polymorphic field, e.g.: 'SomeClass : SomeBaseType'
// LockOnNotNullReference: Defines if the polymorphic field should be disabled if value is set to a not-NULL value.
// HandleNonDefaultConstructors: Defines how types with non default constructors should be handled when instantiating.
[PolymorphicFieldSettings(ShowBaseType = true, LockOnNotNullReference = false, HandleNonDefaultConstructors = PickerHandleNonDefaultConstructors.ConstructIdeal)]
public IInterface Example;

General Patch Notes

Odin Inspector

Additions

  • Added an extension to UnityEngine.Color that retrieves the perceived luminosity: ColorExtensions.PerceivedLuminosity.
  • Added a new SearchField: Sirenix.Utilities.Editor.SearchField.
  • Added Frames-per-second timers for GUITimeHelper.
  • Added extensions for GUIStyle.CalcSize in GUIHelper, these cover use-cases where a string would be measured instead of a GUIContent, and where a Width is intended to measured.
  • Added BlackLabelCentered, MultiLineWhiteLabel and RichTextLabelCentered to SirenixGUIStyles.
  • Added MenuBackgroundColor to OdinMenuEditorWindow to allow customization of the Menu background color.
  • Added IsSelectable and IsEnabled to OdinMenuItem's.
  • Added overloads for drawing sliced or repeating textures inside SirenixEditorGUI.
  • Added overloads for drawing rounded rect's inside SirenixEditorGUI.
  • Added extensions for System.Types that allows for instantiating a default value of a given type based on a scoring system for its constructors.
  • Added a HybridObjectPicker for handling picking objects from a C# environment and Unity environment intertwined.
  • Added extensions for OdinMenuTree's for quickly assigning Icons to items with NULL values or items without icons.
  • Added overloads of UnitField and SmartUnitField to SirenixEditorFields for float, double and int types.
  • Added GUIHelper.DrawLastControlId debugging method to draw a label of the last set control id.
  • Added IsMouseOver extension for Event.current.
  • Added SerializeReference support for the Serialization Debugger, and a SerializeReference validator.

Changes

  • Cleaner string formatting for numbers displayed by Unit fields. Unit fields now have their own separate format strings in SirenixEditorFields, and can be modified as preferred.
  • DisplayAsString now features a Format property that uses the IFormattable interface.

Fixes

  • Fixed an issue where the AssetReferenceValidator would throw invalid errors on addressable sprites.
  • Drawers called after ValidationDrawer now have more consistent ControlId's.
  • Fixed Odin not showing that prefab variant values have been modified.
  • Made sure ObjectIsReferenced in PropertyTree handles the value itself being UnityEngine.Object.
  • Added missing ODIN_INSPECTOR_3_2 script define.

Odin Validator

Additions

  • Added a new button to the validator window under 'Asset Filters', allowing you to view a list of all assets scheduled for validation in the current profile.
  • Added an asset load timing table to the Profiler tab of the validator, which displays the 50 most time consuming asset load operations the Validator has performed. This can be useful to determine which assets are causing stutter in the editor due to the Validator waiting for Unity to load them.
  • Made toggling the validator on and off more user-friendly: The validator can now be easily toggled on or off by right-clicking the scene view widget. A "Stop" option has also been added to stop whatever it is doing. In the config window, the GUI elements for toggling which events should trigger validation are now disabled when the "Keep main background validation session alive in background" is off, clarifying that this option disables the Validator.

Fixes

  • Fixed an issue where background validation catch "on scene load" events from additively loaded scenes.
  • Fixed an issue where background validation only worked on the main validation profile.
  • Fixed an issue where Debug.Log events, during specific asset loads, were incorrectly treated as errors during validation.
  • The left side bar of the validator window can now be dragged to a size larger than 900 pixels. It is now constrained to the size of the window instead.

Odin Serializer

Fixes

  • Fixed issue #913, again, for iOS - this time for good. This issue would cause some data serialized on iOS using xcode 15 and above to become corrupt; specifically, this issue affected binary serialization of 64 and 128 bit primitive values (long, ulong, double, guid, decimal). In the end, the method of how the data is written to the data buffer was changed entirely in a way that didn't trigger the new xcode compiler bug that caused faulty inlining that would corrupt the memory of stack variables.