There will be duplicate patch notes here, as the 220.127.116.11 patch notes represent the full delta from version 3.0.13. Hence, there is a bit of overlap with the 3.1.0.x beta patches.
As this was the first public release of the new Odin Validator, there are no patch notes for this version.
Added lazy fetching of PrefabUtility.GetPropertyModifications for a PropertyTree's PrefabModificationHandler, so it is only fetched when it is requested on any given frame, as
fetching it is very slow. More optimizations are coming to this, such that fetched modifications are only updated when they actually change, instead of every frame they are
actually requested, which is still the case even with this change.
Attribute expressions are now cached for a time to prevent constant repeated parsing and compilation of the same expressions in cases such as validation scanning.
PrefabModificationHandler is now cached and reused properly when PropertyTree instances are cached and reused.
Drastically increased performance of validation and project scanning over prior versions of Odin. Changes made are too numerous to list exhaustively, and cover the entire codebase.
We have seen 10-100x improvements in scan time, though scans of very large projects can still take a while. In most of our test cases, Unity's asset and scene loading accounts for the
majority of the validation scan time.
EditorOnlyModeConfig now has far less of an impact on startup time. Where before it could take seconds, it will now in most cases take <3 milliseconds to initialize.
Added SdfIcons to Odin, a new class for drawing icons in the editor. These are a set of icons which are drawn using signed distance fields, meaning they scale to being drawn precisely at
any resolution. Long term, these will replace the EditorIcons class. The SdfIcons class includes the entirety of the Bootstrap icon library. You can search and preview available icons
using the new Tools > Odin Inspector > SDF Icon Overview window.
Added PlaceholderLabel attribute, which draws a placeholder label inside a text field while the text field is empty.
Added three new attributes: RequiredInPrefabAssets, DisallowPrefabModifications and RequiredInPrefabInstances.
Added EnumTypeUtilities and cleaned up EnumSelector.
Added leak detection for Odin PropertyTree instances, which will print a helpful message to the debug log when a PropertyTree is garbage collected without first having been disposed, and which contains information about where the tree was allocated to help track down the source of the leak.
Added MessagBox overload in SirenixEditorGUI that takes a GuiStyle.
Added MiniLabelCentered to SirenixGUIStyles.
Added PropertyTree.EnableLeakDetection setting.
Added RecordUndoForChanges to PropertyTree, that lets you specify whether or not the undo should be recorded.
Added Sirenix.OdinInspector.Editor.UndoTracker utility that can be used to track when objects are modified, as well as when those modifications are undone and redone on which objects.
Added various OdinMenuTree colors to SirenixGuiStyles.
Added EditorPref<T> with subtypes EditorPrefBool, EditorPrefString, EditorPrefFloat, EditorPrefInt and EditorPrefEnum<T> as a convenient utility wrapper for values stored in editor prefs.
Added ProjectSetting<T> with subtypes ProjectSettingBool, ProjectSettingString, ProjectSettingFloat, ProjectSettingInt and ProjectSettingEnum<T> as a convenient utility for a value which can either be stored serialized in a project asset, or overwritten on a local machine basis by being stored in editor prefs.
As such, this enables having settings values which can be adjusted in a project but also controlled on a per-machine basis with local user overrides for improved collaboration possibilities. Also added
ProjectSettingKeyAttribute, and ProjectSettingsGlobalConfig<T> as a new GlobalConfig type which supports storing ProjectSetting values via ProjectSettingKey attributes set on the settings members.
Added .Slice() extension method to strings which is the same as .Slice(0).
Added TrimStart(), TrimEnd() and Trim() to StringSlice.
GuiHelper.GetAssetThumbnail now gives more accurate thumbnail icons.
Added bounds check to StringSlice's indexer.
CustomValueDrawer now also works for drawing methods and expressions that return void; in this case, no value will be set automatically.
Fixed a bug where OdinEditorWindow's without a scroll bar would not paint the background correctly.
Fixed bug where EnumSelector.DrawEnumField didn't draw the label provided.
Fixed case where setting new targets on a property tree would prevent prefab modifications from working properly.
Fixed issue where the ToggleGroup attribute would not respect setting CollapseOthersOnExpand to false when it has multiple members.
Fixed several issues where PropertyTrees was not properly disposed.
InspectorTypeDrawingConfigDrawer now uses SafeGetTypes() when retrieving types from assemblies, to protect itself from corrupt loaded assemblies.
PropertyTree's now ApplyChanges when disposed.
Range, MinMaxSlider, MaxValue and MinValue attribute drawers no longer immediately clamp the value to valid values when drawing; values are now only clamped to valid ranges when user input changes the values so that data does not mutate merely by inspecting it.
Reverting prefab modifications on a value now triggers OnValueChanged for that value.
Fixed multiple cases where TypeSearchIndex would incorrectly match many different types in ways that would later be filtered away. Type matching is now more precise to begin with, without need for further filtering.
Type matching for all drawers, validators, resolvers and processors has been changed to allow for polymorphic matching on non-generic targets. IE, public class UnityObjectDrawer : OdinValueDrawer<UnityEngine.Object> will now in fact match on and draw all UnityEngine.Object instances without needing to be generic and using generic constraints to match on those types instead.
TypeSearchIndex's match search API now requires you to pass in TargetMatchCategory values for each match target, both when indexing types and when matching them, in order to more precisely distinguish between which things to match as values and as attributes.
InspectorProperty.NiceName for ordered collection elements now takes the form of "CollectionNiceName [index]" instead of just "index".
Marked various obsolete members as being hidden from IDE intellisense
All debug symbol files for Odin's assemblies are now marked portable for better cross platform and cross Unity version compatibility.
Removed all deprecated features from Odin Validators.
Removed obsolete OpenGlobalConfigWindow.
SirenixGUIStyles.RichTextLabel now word wraps.
The overload of GUIHelper.RequestRepaint that takes an argument of how many frames it should repaint has been deprecated.