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.