Odin Inspector Version 1.0.5.2


Additions

  • AOT Generation: Added ability to automatically scan the project and generate an AOT dll whenever a build is started. This is off by default, but can be enabled in the AOT Generation preferences. This feature is only available in Unity 5.6 and above.
  • Added a new class called DragAndDropUtilities for easier adding good drag and drop support to varius feature throughout Odin. It out of the box adds support for moving, copying, swapping and selecting values, for both Unity Object and non-Unity types alike.

    Two Dimensional arrays are the first to use this new API. See the gif down below.
  • Added 3 new properties to the TableMatrix attribute:
    • SquareCells: Automatically resizes the height of each cell to match its width.
    • HideColumnIndices and HideRowIndices: Hides the horizontal and vertical rows on tables. Note that this will also currently prevent the user from adding, removing and dragging rows and columns.
      Note: You can hold Shift to copy, and hold ctrl and click the top right button to quickly remove an item.
  • The EnableIf, DisableIf, ShowIf and HideIf attributes now support enum values.
  • The ColorPalette attribute now also works with the $ sign.
  • Added a Draw(rect) method to EditorIcons which handles linear color space, and renders the icon with a custom-shader that makes the icon look crisp and nice. This fixes the bug where all of Odin's icons would be black in the inspector, if linear color space is enabled in the project.
  • Added inspector and serialization support for .NET Tuple classes (not the C# 7.0 tuple feature) when using the new 4.6 scripting backend on Unity 2017.1 and above.
  • You can now pass a generic parameter as the drawn attribute type on Odin attribute drawers and use generic constraints to narrow down which attributes it can draw.
  • Added a ReadOnly option to the FilePath attribute.
  • Whether lists shouls show index labels by default can now be specified in the Odin preferences window.
  • Added the "AlwaysAddDefaultValue" to ListDrawerSettings, which, if enabled, causes the Add button to instantly add a default value when clicked without ever bringing up an object/type picker.
  • Added nice, instructive error messages when the serialization system encounters a type with missing AOT support at runtime. This replaces the former chaotic bombardment of confusing, scary error messages that people were getting.
  • The delegate drawer can now also be drawn on non-Unity objects.
  • Added OnPropertyValueChanged event to PropertyTree, which is invoked every time a value is changed on any property in the tree.
  • The Horizontal Group attribute now has a LabelWidth property.

Changes

  • Overhauled the UI for the delegate drawer, making it much simpler. Note, that you can no longer navigate the Scene via the context-menu drop down. Instead, you drag in the target object and find the method you want to reference.
  • Renamed "DirectoryInfoExtensions.IsSubDirectoryOf" to "DirectoryInfoExtensions.HasSubDirectory" to reflect what the method actually does.
  • Color palettes can now be accessed and modified from code. Note that the color palettes will NOT automatically be included in your builds. But you can now easily fetch all color palettes via the ColorPaletteManager and include them in your game like so:
  • Simplified the Persistent Context window and the Color Palettes window.
  • The height of the instance creater window now matches the size of its content.
  • MemberInfos are no longer drawn by the references drawer.

Fixes

  • Fixed issue where paging on table lists was broken.
  • Fixed issue where running a scene validation scan had a high likelihood of crashing the editor on Mac OSX. The cause of the crash was the progress bar dialog, so the validation scan no longer shows a progress bar on Mac OSX.
  • Fixed cases where, in some versions of Unity from 2017.1 and up, AnimationCurve and Gradient wouldn't be rendered properly by Odin, when serialized only by Odin and not by Unity.
  • Fixed bug where declaring two [CustomPropertyDrawer] attributes with the same type argument on a legacy PropertyDrawer would cause Odin's drawer locator to explode. It now correctly only registers the drawer once for that type argument.
  • Fixed issue where you could still drag Unity objects into a list, even if IsReadOnly was set to true using the [ListDrawerSettings] attribute.
  • Fixed error where passing an AbsolutePath = true parameter to the [FolderPath] attribute would cause a null reference exception if you click the folder icon with an empty string as the current path value.
  • Fixed error in binary deserialization where some data might be lost if the data layout changes between serialization and deserialization in a way that necessitates skipping over primitive entry types without a formatter. This was the cause of a lot of the "InvalidOperationException: Invalid binary data stream: could not parse peeked BinaryEntryType byte '0' into a known entry type." errors that some people were seeing sporadically.
  • Fixed a bug where Odin incorrectly assumed that Unity would serialize UnityEngine.Object types with generic type arguments.
  • Fixed a bug where the remove dictionary item button would be drawn even when DictioanryDrawerSetttings.IsReadOnly is true.
  • Odin now correctly guesses that Unity will not serialize Coroutines.
  • Added lots of safety clauses in various places to ensure that Odin never creates a default instance of a Coroutine, as these instances will cause Unity to crash the moment one is garbage collected.
  • Fixed a bug where the persistent cache file path could contain illegal characters.
  • AOT Generation: Fixed an error where the AOT Generation scan would only scan scenes, not project assets.
  • AOT Generation: Scanning the project will no longer save scenes or assets when scanning, so scene files and assets will no longer be modified by a scan.
  • AOT Generation: Fixed errors where, in some cases, the AOT Generation scan would not find types which needed AOT support. It should now be far better at finding all types that need support. This was particularly causing issues for dictionaries with enum keys.
  • You can now drag texture assets containing sprites into sprite lists, and as is the default Unity behaviour, the first sprite in the asset will be added.
  • Sprite values in members (not collection elements) are now drawn with the proper Sprite GUI.
  • Clicking the "Inspect object" icon on Sprites now inspects the main texture asset rather than the sprite sub-asset.
  • Fixed various errors where the serialization system did not respond correctly to SerializationAbortExceptions being thrown.
  • UnityEventDrawer is now better about showing a relevant error message when a UnityEvent has been declared in an unsupported manner.
  • Exceptions thrown while Odin is drawing are now displayed better in the console, and not confusingly split between two different console messages.
  • Fixed a bug where ctrl+clicking a polymorphic object field or ctrl+clicking the add button of a polymorphic list, in order to select the first instance without opening the instance creator window, would throw a harmless error in the console.
  • Fixed a bug where Odin would sometimes find the wrong equality operator for comparing values on types with multiple equality operators.
  • Fixed a bug where some paths used by the persistent context window were invalid on Mac.
  • Fixed a bug where double clicking on a property with the file or folder path attribute, with a path that does not exist in Unity, would cause an error in the console.
  • Fixed bug where generic drawer resolution would throw exceptions if it encountered a generic parameter with a constraint to another generic parameter which is a struct, while resolving a partially constructed generic drawer.
  • Fixed bug where generic drawer resolution would incorrectly resolve partially constructed generic drawers by failing to take the partially constructed arguments into account when checking constraints.
  • Fixed bug where Odin's registration of Unity legacy drawers did not take the "useForChildren" argument on the CustomPropertyDrawer attribute into account.
  • Fixed issue where Scene Validator Window wouldn't find inactive game objects.
  • Fixed issue where the AOT Sirenix.Serialization.AOTGenerated.dll generated on Mac would be slightly invalid and cause internal compiler exceptions when building to iOS.
  • Force renamed AoTGenerationConfig.cs to AOTGenerationConfig.cs to reflect the exact class name capitalization. This was causing issues when using Odin in source mode.
  • Fixed a bug in the DeepReflection utility where creating emitted member getters wouldn't box value types when needed.
  • Fixed a bug where properties drawn by Unity PropertyDrawers would not work in Unity 2017.1 and above.
  • Fixed issue where the ColorUsage attribute would cause the color value to be unable to be edited.
  • The GUIHelper extension method RepaintIfRequested(Editor editor) now also requests a repaint on the currently drawing window if that window is not an inspector window. This ensures that users using Editor.CreateEditor to draw inspectors in custom editor windows no longer get a "laggy" window due to repaint requests not triggering correctly from inside the created editor instance.
  • The drawer for the [InlineButton] attribute now has a wrapper priority of (0, 1, 0) instead of the default value priority of (0, 0, 1), causing it to work correctly with attributes such as [ValueDropdown].
  • Fixed issue where the [AssetList] attribute would not work on Mac if a path constraint was specified.
  • Fixed issue where changing object values in an AssetList through the asset list dropdown could cause UI layout exceptions to be thrown.
  • Fixed issue where ExitGUIExceptions thrown inside an InlineEditor (for example when opening the color picker) would cause CurrentInlineEditorDrawDepth to not be decremented, thus permanently ticking up the current draw depth, and eventually causing all properties to be blocked from drawing due to the draw depth cutoff.
  • Editor Only mode now disables the link.xml file, and moves the Global Serialization Config file out of the resources folder which was preventing people to build to some platforms while in the Editor Only mode.
  • Fixed issue where adding new elements in a Unity-serialized list that could reference Unity objects would cause said Unity objects, such as GameObjects and ScriptableObjects, to be created using their default new() constructors, if they had any.
  • Fixed an issue where CustomValueDrawers didn't override some existing value drawers.
  • Made some minor improvements to TabGroups.
  • Animations throughout Odin should now appear a lot smoother and more consistent.
  • Fixed an issue where TypeExtensions.GetBaseTypes(includeSelf: true) didn't include itself if the given type was an interface.
  • Config files now support being relocated to anywhere in the project. This means that the Serialization Config file can now be taken out of the resources folder, which is required by some platforms when using Odin in Editor Only mode.
  • Updated documentation for SirenixEditorGUI.DynamicPrimitiveField, to reflect added type support for Guid and enums.