Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[RELEASED] Odin Inspector & Serializer - The Ultimate Workflow Tool ★★★★★

Discussion in 'Assets and Asset Store' started by jorisshh, Jun 15, 2017.

  1. candycat

    candycat

    Joined:
    Jun 5, 2014
    Posts:
    29
    Bug report. After upgrading to 2.0, ListDrawerSettings(IsReadOnly = true) didn't work.
     
  2. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    587
    Hi,
    my code looks like this:
    upload_2018-8-22_14-21-30.png

    Then in the editor it looks like this:
    upload_2018-8-22_14-21-53.png
     
  3. kobyle

    kobyle

    Joined:
    Feb 23, 2015
    Posts:
    84
    Hello,

    I have 5 TabGroups, and I want to select one of them on Selection change through custom code, how can I do that?

    Thanks!
    Koby
     
  4. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    144
    Hey I was looking at using this to develop a Unity editor extension for the asset store. Is this currently possible or is there licensing issues with doing so?
     
  5. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    422
    I often get this error when compiling my code, it's not that big a deal but I think it's caused by Odin.

    A PreviewRenderUtility was not clean up properly before assembly reloading which lead to leaking this scene in the Editor. This can be caused by not calling Cleanup() during the OnDisable of an Editor or an EditorWindow.
    UnityEditor.PreviewRenderUtility:Finalize()
     
  6. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    422
    I would like to make my member fields be togglable. But not through a normal Odin Toggle.
    It should be on the same line, just like in the Post-Process package of Unity.
    How can I achieve this?

    Here's a gif to show the behaviour:
    https://i.imgur.com/lpVNCce.gifv
     

    Attached Files:

    Last edited: Aug 25, 2018
  7. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    835
    When I update Odin should I remove the asset first and then download and import the new one?
    or should i just import on top of it?
     
  8. dantonel

    dantonel

    Joined:
    Dec 7, 2015
    Posts:
    8
    Is there something special I have to do to get Odin to properly serialize strongly-typed enum classes like this one:
    Code (CSharp):
    1.     [System.Serializable]
    2.     public class TypeTest
    3.     {
    4.         public static readonly TypeTest A = new TypeTest();
    5.         public static readonly TypeTest B = new TypeTest();
    6.         public static readonly TypeTest C = new TypeTest();
    7.     }
    8.  
    Whenever I create a TypeTest variable in a script and give it a ValueDropdown, I can select the values, but they never get remembered when I enter play mode.
     
  9. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    587
    Hi, I've met an issue with dragging elements in a list with derived class

    I've created several classes derived from a base class and declared a list of the base class in a serialized monobehavior.
    And edit the class type and properties in the editor.
    Then I found a bug when dragging and deleting the elements: when elements should move in the list, I found the properties of the same adjacent elements does not move.
    For example:
    upload_2018-8-30_10-8-45.png
    Pay attention to the 27th element's properties, I'll delete the 26th element.
    upload_2018-8-30_10-11-37.png
    The 26th element changed to the ToLookAtItemTask as it should be, but the 27th element kept the original properties where it should be the properties moved upwards from the 28th element.
    This is hurting my workflow for I need to rearrange the order of the elements.
     
  10. Kripll

    Kripll

    Joined:
    Jan 20, 2017
    Posts:
    7
    Hey. Do you have solutions so that when you remove an item from the list, so that you can call your function?
     
  11. dantone1

    dantone1

    Joined:
    Jun 2, 2017
    Posts:
    3
    Also, is there a version of ValueDropdownAttribute/ValueDropdownItem/ValueDropdownList that allows me to use a callback to generate the item that should be added when an element in the dropdown is clicked?

    Edit: Just revisited this myself and discovered the IValueDropdownItem interface, and found that if I simply create my own class that implements that interface, I can use it to do exactly what I need.
     
    Last edited: Sep 7, 2018
  12. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    307
    Hello,

    Is there a way to draw another object's properties from within a drawer?
    In other words, I have a object (lets call it ObjectA) that has a field that is a reference to another object (Object B).

    If I have a drawer for ObjectA, can I draw a field that in ObjectB?

    The reason for this is that I have a sort of "parent system", in which objects can "parent" others... and for each field, I allow the object to override the parent's value. I want to make it so when the field is not overridden, it shows a disabled field that displays the parent's value.

    Here's a very messy example of what I have now:


    Thanks :)
     
  13. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    307
    For some reason, when I serialize a class using SerializeValue, fields marked with "System.NonSerialized" still end up being serialized. Why is this?
     
  14. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    896
    Just wonder if Odin yet supports you being able to create graph/nodes based editors?
     
  15. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    835
    Why is everyone's questions not being answered?
     
  16. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    896
    To be fair should probably have put the question on discord.... ;) But now I've put it here...
     
  17. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    106
    Hey, just updated Unity to 2018.3 Beta and getting a lot of those:

    Code (CSharp):
    1. MissingMethodException: UnityEngine.Object UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(UnityEngine.Object)
    2. Sirenix.OdinInspector.Editor.PropertyTree`1[T]..ctor (UI.Xml.XmlElement[] targets, UnityEditor.SerializedObject serializedObject) (at <3c01eaab89c14020b3768bdc5f54b1bb>:0)
    3. System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    4. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    5. System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    6. System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    7. System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    8. System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    9. System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    10. System.Activator.CreateInstance (System.Type type, System.Object[] args) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    11. Sirenix.OdinInspector.Editor.PropertyTree.Create (System.Collections.IList targets, UnityEditor.SerializedObject serializedObject) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/MaxValueAttributeDrawer.cs:39)
    12. Sirenix.OdinInspector.Editor.PropertyTree.Create (UnityEditor.SerializedObject serializedObject) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/ToggleLeftAttributeDrawer.cs:25)
    13. Sirenix.OdinInspector.Editor.OdinEditor.get_Tree () (at <3c01eaab89c14020b3768bdc5f54b1bb>:0)
    14. Sirenix.OdinInspector.Editor.OdinEditor.DrawOdinInspector () (at <3c01eaab89c14020b3768bdc5f54b1bb>:0)
    15. Sirenix.OdinInspector.Editor.OdinEditor.OnInspectorGUI () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:173)
    16. UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1599)
    17. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    18.  
     
  18. grimmy

    grimmy

    Joined:
    Feb 2, 2009
    Posts:
    393
    Anyone know how I can add buttons where the red boxes (That I added with photoshop) are in my ListDrawer...? Thanks
    upload_2018-9-14_8-24-56.png

    Also, how would I change the colour of just one of the labels? For example change the 9:18 to green.

    Oh, and how do I set the background color of a table row?

    ..and how do I change the color of a label.

    Cheers
     
    Last edited: Sep 14, 2018
  19. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    514
    Hi there

    Is there an ETA on nested prefabs support now that the 2018.3 beta has dropped?
     
  20. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    212
    @Prodigga We just released a patch which provides better support for 2018.3 beta, we'll have patch notes up tomorrow. We're still working on getting nested prefabs to work well, and still no ETA on that, unfortunately. But we'll give an update on the roadmap once we know more.

    @grimmy Check out the ListDrawerSettings attribute, from there you can hook into BeginDrawListElement, and EndDrawListElement, there should be an example in the demo scene, and i belive there is one in the online documentation as well. You could potentially also make a drawer for your list element type, and only have it be applied to list elements. Hope that helps!

    @Shadowing We're not as active in here sorry, but we try to direct our users to sirenix.net/support our issue-tracker and our Discord server where we're providing support and answering questions on a daily basis, and the community in there is super helpful as well.

    I'm going to leave this in here again for people to see :)

    Discord
    I would highly recommend you guys joining our Discord ;) We're much more active in there, and if we're not around, then there's a lot of other active and helpful people who're often willing to help.

    Isssue-Tracker
    If you have an issue that you don't want us to forget about, this is the place! If we see a blocking-issue, we'll prioritize it highly, and often do sweeps where we just go through open issues. Feature requests are also more than welcome in here.

    Sirenix.net/support
    If your question or inquiry is more suited for an email, this is the place! Here we also answer all messages!
     
    Last edited: Sep 17, 2018 at 11:46 PM
  21. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    175
    bjarkeck likes this.