Thank you for such exhaustive answer, sounds like something I always wished for in Unity. Also thanks @brisingre for his insight on AdvancedInspector. We are going to buy Odin Inspector immediately on day one. And I feel like it’s going to be our #1 on MUST HAVE package list. How many people approx are working on Odin if I may ask? Also you mentioned some garbage on run-time. How much in comparison with Unity default serializer? This garbage is being generated only when scene is being loaded? Thanks in advance. This is some incredible work you are doing here guys. Top notch!
Sirenix is a team of three developers, who have been working full-time on Odin for quite a while now.
As for how much garbage we generate, it depends. Serializing using our optimized binary format - the format that runs in builds by default - generates very little garbage. In fact, when serializing and deserializing binary data, generally the only garbage that is allocated are the metadata strings. IE, if you have a field named “someField”, a string “someField” will be allocated during serialization/deserialization so we can know what the field is called. This is rather difficult to avoid.
The only exceptions to this rule are enums, which are currently boxed to the Enum type upon serialization/deserialization, and thus generate a tiny amount of garbage. It is theoretically possible to get around this using either unsafe or runtime-emitted code, we just haven’t done it yet.
As for when garbage is generated, generally during scene load, yes. To be more precise, in builds our serialization runs whenever an Odin-serialized object is instantiated from a prefab, or loaded. Instantiate serializes the prefab and then deserializes the data into the new instantiated object, while load merely deserializes the object from pre-existing scene or asset data.
Thank you again for the reply. Sounds perfectly reasonable. Now I will just keep looking forward to the release date.
New little feature: The AssetList attribute now also has functionality for non-array types. And, of course, it works with all the filters (Except for AutoPopulate):
P.s. Thanks to all the amazing beta testers, we’re getting very close to release now!
Just wanted to chime in and say I’m super excited for this! There’s been multiple times during development recently that I wished for even 10% of these features
What if I told you that you can win Odin for free in our Odin-will-soon-release-celebration-giveaway?
Join the giveaway here: http://vyper.io/c/1059
To be honest, I believe you haven’t updated AdvancedInspector in quite a long time. The [AdvancedInspector] attribute was “retired” over two years ago.
Odin looks nice, by the way.
I’ve updated it, but I might not have updated it properly, i.e. deleting old versions manually and doing a clean install.
I’ll try that, and update my post if it works. That’s only fair.
That said, even if this fixes it, I’m going to try to switch to Odin, I think. My overall experience of Advanced Inspector is that, every time I’ve used it, it’s saved me a lot of work for a while by letting me do things like inspect List and whatever, and then eventually ended up creating a lot of work tracking down an issue that ends up being AI-related. It’s certainly not the first asset to ever make me track down an issue, but I really don’t want that from an inspector replacement. I really want it to “just work.” Perhaps that’s too much to ask, and I’ll have similar issues with Odin. Time will tell.
Here is how the newly added support for dictionaries looks. We also handle self-referencing infinite draw loops which the gif also showcase
Any idea on a day when the asset will be released? I’m looking forward to this asset!
I heard the asset was already sent to the Unity Asset Store review system
Odin is released now.
Will of course buy it as soon as I have the money
Yes, it is official! Odin is finally here.
Thank you so much to the Unity Asset Store team for approving Odin
We (Devdog and Sirenix) look very much forward to hearing what you think about Odin. We’ve been working super hard on it for the past 10-11 months now.
Congrats, looks good from what I saw so far.
I might have missed it in the manual, but how can I display Dictionaries with custom classes in the inspector ?
public Dictionary<enum, customClass> Dictionary = new Dictionary<enum, customClass>();
wont show up for me in the inspector.
I bought it, I’ll be playing with this for the next few weeks and i’ll write up a review on the asset store. Love you. Saving me tons of time from making custom editors for smaller things.
Will I only be able to create custom inspectors for my personal projects? Or could I create a custom inspector for an asset of mine?
There are a couple of ways to show dictionaries in the editor. The first one is to inherit from SerializedMonoBehaviour.
This means that the public dictionary field will be serialized, and Odin will, therefore, include the property in the inspector.
Another way is to add the [ShowInInspector] attribute to the field. However, then you will need to handle serialization yourself if you need it.
There is also the [ShowOdinSerializedPropertiesInInspector] which you can put on your MonoBehaviour class or base-class. This will mark a type as being specially serialized. Odin uses this attribute to check whether it should include non-Unity-serialized members in the inspector.
Odin will serialize any dictionary, and the inspector does not care what types the values are. But for the dictionary key type, we currently only support primitive types such as string, char, byte, int etc… However, enums is actually one of those types we could add support for in the future.
Is there a list of all the attributes that are added? Is this it? Odin Inspector and Serializer | Improve your workflow in Unity
http://sirenix.net/odininspector/documentation/sirenix/odininspector/assetlistattribute
You can find all the new attributes on the left side. Please open the corresponding section under Code Reference and open the “Attributes” item.
Very nice, I’ve been waiting for someone to (try to) tackle the slowness of custom serialization. I’ve been a dedicated tester of VFW and followed its serialization woes and breakages at each new Unity version release until the developer finally threw the towel and deprecated custom serialization. So, some questions before I purchase this in hope that it is the holy grail we’ve been searching for:
- I’ve seen you got horizontal layout options, excellent - but how do you define the width of each horizontal section?
- Can you define the width of key and value columns in the dictionaries inspector? Do you have settings like “Auto width”, “x% width”, “pixel width”? This is critical for the proper display of different dictionary KVP combinations.
- As for your custom binary serialization, how ‘shielded’ from Unity’s several API changes at each new release do you expect Odin to be? FullInspector and others have had a tough time with Unity upgrades breaking their deserialization process.
- How fast is your custom binary serialization when compared to Unity’s ridiculously limited yet blazing fast serialization?
- Can you use Odin styling for EditorWindows?
- Inlining by itself is a must-have, killer feature, I’ve done editor inlining manually and am pretty aware how painful it is to do it without a helper. Does your inlining implementation support Scriptable Assets?
- Can your custom serialization work with non-MonoBehaviours, like StateMachineBehaviour for instance? I saw you have an attribute for class serialization, not sure if it works for this.