[Starting 2018.2] UnityEvent serialization not displayed correctly

Issue #365 resolved
Former user created an issue

Since we started using the latest 2018.2 (we were on 18.1 before) release we are seeing the following issue. Have a serialized UnityEvent and check the visualization in the inspector without odin - an object to assign and some dropdown boxes to select the method. Now activate odin and you'll see more some internal serialization structure, see screenshot. It makes it hard for designers to work with UnityEvents and we don't want to disable odin for all classes using UnityEvents. Before 2018.2 it worked flawlessly. we have this issue on two different projects.

Comments (4)

  1. Wrom

    Just started using Odin and I was really amazed until I noticed the issue with the events. A lot of our workflow uses events. So this basically breaks everything and a quick fix would be much appreciated...

    Or is there a way to disable Odin serialization on specific features like Events? Right now my best workaround is temporarily turning Odin off completely (via the editor window) while working on events.

  2. Bennet Jeutter

    You can deactivate Odin Editor for user specific classes, check Menu -> Tools ->Odin Inspector -> Editor Types -> User Types. Then deactivate your class which has the UntiyEvent. However you lose all other Odin stuff for that class :/

  3. Alexandre Monette Martin

    I am new to Odin, but I found elsewhere that you could add the following code in a editor script to disable Odin UnityEvent drawer:

    using Sirenix.OdinInspector.Editor.Drawers; using UnityEngine.Events; using Sirenix.OdinInspector.Editor;

    [OdinDrawer] public class DrawUnityEventsWithUnity<T> : DrawWithUnityBaseDrawer<T> where T : UnityEventBase { }

  4. Log in to comment