Search Unity

Full Inspector: Inspector and serialization for structs, dicts, generics, interfaces

Discussion in 'Assets and Asset Store' started by sient, Jan 23, 2014.

  1. braaad

    braaad

    Joined:
    Oct 4, 2012
    Posts:
    102
    No problem. I just checked and it's fixed.
     
  2. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    137
    Hey sient, glad you're back!

    Thought I should mention that the latest Full Inspector build (FullInspector-2.6.3 from 02-03-2016) gave me deserialization errors on startup which destroyed the data in every object inheriting from BaseScriptableObject in my project. (I had an immediate backup, of course.)

    I used the sure-fire way to update described here.

    I haven't seen this with 2.6.2 even with its errors that need to be worked around in Unity 5.3, so it's possible this is something new? I didn't save the error log, but I can repeat the process again if getting a log would be helpful.
     
  3. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    Until you have a new version live on the Assets store please update the store description to point out that the asset is broken with 5.3 but that you can download 2.6.3 to resolve, just wasted an hour because of this :(

    Epic asset though, really pleased with it once I did finally get it working :)
     
  4. Deleted User

    Deleted User

    Guest

    Hey sient where can I find the PropertyDrawers / CustomEditors for all drawing reorderable lists / arrays and seeing other objects within objects? basically I'd like to use Full Inspector but without the Serializer.
     
  5. sz-Bit-Barons

    sz-Bit-Barons

    Joined:
    Nov 12, 2013
    Posts:
    150
    For reaorderable list you don't need Full Inspector. in fact full inspector uses Rotorz Reorderable List.
    Since Unity 4 (i think) Unity integrated that project (or parts of it... donno) hidden in the UnityEditorInternal namespace.
    Here is a Tutorial how you can use that.

    Seeing other objects within objects is possible with unity itself. Just make sure you declare the classes you wanna see [Serializable].
    For more advanced features like inheritance, structs and generics you have to use FullInspector WITH one of the supported serializers.
     
  6. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    There is an issue with that build where SerializeAutoProperties got set to the incorrect value (false), where it should be true.

    I haven't been able to reproduce the issue your are encountering. What errors did you get?
     
  7. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Sorry about that - I've submitted the change request to Unity.
     
  8. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    You should check out fiInspectorOnly, which does exactly what you want.
    Serialization and inspection are entirely separate concepts in Full Inspector.

    You can find the collection property editors in FullInspector2/Modules/Collections/Editor. Generally, look for any type that derives from PropertyEditor or BehaviorEditor.
     
  9. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    As a heads up, I haven't started replying to PM's just yet (though I will as soon as I get 5.4 support done). I always reply to this thread and then try my best at email.

    I'm currently working on 5.4 support, which is trickier than I was expecting it to be because there is a critical optimization I need to reimplement. It took me a bit of time to figure out a way to write it, but I have finally figured out an approach that will work effectively.
     
    Maisey, johanneskopf and sanpats like this.
  10. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Hey @sient, I'm trying to look at the guide and other information from your page and it looks like your page was removed. Error 404 everywhere. What's up with that? :)
     
  11. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
  12. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    @sient

    I serialize an interface called IBonus. I put a class called PrimaryElementalRuneBonus which derived from a Bonus class, which in turn implement IBonus interface. In the Inspector, there is (skips ctor) after the class name of PrimaryElementalRuneBonus. What does it mean?



    Code (CSharp):
    1. public class PrimaryElementalRuneBonus : Bonus
    2.     {
    3.         public PrimaryElementalRuneBonus(CharacterSheet characterSheet, Characteristic characteristic)
    4.         {
    5.             CharacterSheet = characterSheet;
    6.             Characteristic = characteristic;
    7.         }
    8.  
    9.         public CharacterSheet CharacterSheet { get; set; }
    10.  
    11.         public Characteristic Characteristic { get; set; }
    12.  
    13.         [ShowInInspector]
    14.         public override int Value
    15.         {
    16.             get
    17.             {
    18.                 return CharacterSheet.PrimaryElementalRuneCharacteristic == Characteristic.Type ? 1 : 0;
    19.             }
    20.         }
    21.     }
     
  13. sz-Bit-Barons

    sz-Bit-Barons

    Joined:
    Nov 12, 2013
    Posts:
    150
    Hi sanpats,

    "ctor" stands for "constructor". this means the constructor won't be called.

    That behaviour (to skip the constructor) is very common for dserialization since all the values are deserialized.
    If you have initialization logic in your constructor you should handle it in another way... like having an "Initialize()" Method which is called by a Component on Awake() or something like that...
     
    sanpats likes this.
  14. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    Hi guys! Anybody have last trial version (for 5.3)?
     
  15. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I've gone ahead and sent you a PM.
     
  16. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    If you are trying out Unity 5.4, please download the latest build from the access page.

    I've ended up having to make more changes than I expected - Unity has deprecated *every* Unity API method call from off the main thread. This includes things like UnityObject.GetHashCode() (IMHO, it's a bit absurd).

    There are still warnings in 5.4 about some deprecated EditorGUI calls. I've read that Unity is going to reverse the deprecation on these methods, so I've held off on fixing them for the time being until closer to the actual 5.4 release date.
     
  17. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    After 5 version Unity will deprecated methods in any new version... its anoing.
     
  18. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Here's the current Full Inspector roadmap:

    2.6.3 is going to be primarily a bug-fix release. It will support Unity 5 through 5.4. I'd like to land it within the next month or so, before 5.4 releases. The most up-to-date build is always available from the access page.

    I plan to introduce some API breakage in 2.7 so I can properly implement multi-object editing. I also want to significantly improve the expressivity of attribute property editors, since they currently have quite a few limitations.

    Another feature I'd like to rewrite is the serialization registration mechanism. This is a behinds-the-scene change so it shouldn't be noticeable, but sometimes the Full Inspector serialization selection window pops up when it shouldn't - I'd like to get this fixed.
     
    Maisey likes this.
  19. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    What will happen with project develop using 2.6.3 updating to 2.7? Will there be a way to upgrade?
     
  20. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Of course - this is just an API change. If you've written any custom PropertyEditors, you'll need to make a few small modifications, though they shouldn't be too intrusive.

    Full Inspector upgrades will *always* be 100% backwards compatible with regards to serialization data.
     
    sanpats likes this.
  21. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I've just a fixed a critical serialization issue; if you're using a build from access, please update. This issue only impacts you if you are using Full Serializer.
     
    sanpats likes this.
  22. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    The latest build seems to work fine with 5.4, but with many warnings about using deprecated API.
     
  23. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    Question about the files in the FullInspector2_Generated folder:

    There are supposed to be the four wrapper scripts, which I can see from a clean install on an empty project:
    • BaseBehavior.cs
    • BaseScriptableObject.cs
    • fiLoadedSerializers.cs
    • SharedInstance.cs
    In my existing project I also see these two additional assets:
    • fiBackupStorage prefab
    • fiPersistentEditorStorage prefab
    Are those prefabs supposed to be there? Have no idea how they got there.
     
  24. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    The warnings should be gone in 5.4.0 beta 6, which got released today.

    Yep. fiBackupStorage.prefab is used to store data if you make an inspector backup. fiPersistentEditorStorage.prefab is used to store things like inspector foldout state.
     
  25. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    Ok, thanks.

    So in a few of my scenes that use FullInspector I get the following warnings that "The referenced script on this Behavior is missing!" for the two hidden objects fiPersistentEditorStorage (with two missing scripts) and fiBackupSceneStorage (with one missing script).

    The only way I've found to get rid of these is to re-create the scene, i.e. create a new scene and copy all the game objects from the hierarchy into the new scene.

    Am I doing something wrong to create this and how can I prevent it from happening again?
     
  26. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Nope, nothing wrong - Unity just got confused. Go ahead and delete the missing component references.
     
  27. Deleted User

    Deleted User

    Guest

    Yeah but Rotorz doesn't automatically make all lists & arrays reorderable like FI does.
    As for #2, what do you mean? If I add the [Serializable] attribute to a UnityEngine.Object I'll be able to see it in a dropdown window when I use it as a reference in a field?
     
  28. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    I'm again getting the problem with serialization not working for interface types on mobile (Android) even though it works perfectly in Editor. I noted this problem recently in this forum and thought it was the call to base.Awake() that fixed it but that wasn't it, clearly, now that it has popped up again despite having base.Awake() calls.

    The current problem is with Unity 5.3.2f1 and the Feb 15 build of FI. Going back to Unity 5.1 and a slightly older version of FI fixes it. Trying to narrow down the problem -- not sure if it's the Unity version of the FI build -- but it does seem to be caused by some combo of Unity and FI versions.
     
  29. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    Ok, I can now confirm: on Unity 5.1.0f3 and the Feb 15 build of FI, I do NOT have the problem reported above.

    So the only variable is the Unity version. Basically what I'm finding is that the latest Feb 15 FI build isn't working on Android with Unity 5.3.2f1, i.e. I'm getting nulls where I should be getting de-serialized objects. This is for a project which works great in Editor.
     
  30. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    Seeing another bug.

    1. Have a class Foo that derives from BaseScriptableObject and an IBar interface
    2. Create an asset for Foo using this approach
    3. Have a [SerializeField] IBar field in a BaseBehavior subclass
    4. In Inspector, set the IBar field to Foo and hook in the asset created in step 2

    All works on first play, but after reloading the scene the field is back to null. This is in Editor. In both 5.3.2 and 5.1.0. With Feb 15 build of FI.
     
  31. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    Further insight into these bugs (i.e. my previous 3 comments): the common link is failure to de-serialize interface members properly. When I change the interface to a class that implements the interface, the bug disappears in both cases -- i.e. now works as expected on Android on 5.3.2 and without the Editor problems with scriptable objects. Being able to use interfaces is a big plus for FullInspector, and I rely on this in the way my project is structured. Hopefully this can be fixed soon.
     
  32. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    How strange. What serializer are you using? Json.NET will serialize interfaces such that they cannot be deserialized if there is a custom converter - this is one of the reasons I wrote Full Serializer.

    Can you share the serialization model / class setup that you can reproduce this with?
     
  33. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    Maybe anybody know... I have problem with custom classes. When I add it into another abstract class after select of implementation I see this (in list after adding new value the same thing):
    5CMFfay[1].png
    How I can turn on forced instanciating of field. I know that I can use property for drawing and auto instanciate, but maybe exist more usefull solution?
     
  34. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    What's the type of GeneratorSlot? Can you post the code for it?
     
  35. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    Its very strange... because I cant reproduce it with simple classes... GeneratorSlot its simple container class with little logic.
    Code (CSharp):
    1. public enum GeneratorSlotMode {
    2.         GENERATOR,
    3.         EFFECTOR
    4.     }
    5.  
    6. [Serializable]
    7.     public class GeneratorSlot {
    8.  
    9.         public bool isGenerator() {
    10.             return _mode == GeneratorSlotMode.GENERATOR;
    11.         }
    12.         [SerializeField,HideInInspector]
    13.         private GeneratorSlotMode _mode;
    14.  
    15.         [ShowInInspector]
    16.         public GeneratorSlotMode  Mode {
    17.             get { return _mode; }
    18.             set {
    19.                 if (value == GeneratorSlotMode.EFFECTOR && generator) {
    20.                     generator = null;
    21.                 }
    22.                 if (value == GeneratorSlotMode.GENERATOR && effector != null){
    23.                     effector = null;
    24.                 }
    25.                 _mode = value;
    26.             }
    27.         }
    28.        
    29.         [InspectorShowIf("isGenerator")]
    30.         public EffectorGenerator generator; //ScriptableObject
    31.         [InspectorHideIf("isGenerator"), InspectorCollapsedFoldout]
    32.         public UnitEffector effector; //Abstract class
    33.  
    34.         public UnitEffector GetEffector(Unit target, Unit owner, ICaster caster, Timeline time, float constValue, IModifier modifier = null){
    35.             if (isGenerator()) {
    36.                 if (generator) {
    37.                     return generator.GetEffector(target, owner, caster, time, constValue, modifier);
    38.                 }
    39.             }
    40.             else {
    41.                 if (effector != null) {
    42.                     return UnitEffector.GetEffector(effector, target, owner, caster, time, constValue, modifier);
    43.                 }
    44.             }
    45.             return null;
    46.         }
    47.     }
     
  36. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    I will solve this problem with custom attribute editor. Another question. Ho I can know that PropertyEditor drawn with foldout? I try implement borders around field or property and all works fine except fields without foldouts.
    Little explanation:

    First element have foldout and we need to draw two lines in left border (befor and after arrow). Second element haven't foldout arrow... we need draw one line instead two.
     
  37. flonussi

    flonussi

    Joined:
    Mar 4, 2015
    Posts:
    1
    Hi,
    I'm really interested in Full Inspector, but I want to try it first. It seems that the trial version is not updated for Unity 5.3. Would it be possible to get a updated trial version of Full Inspector?
    Thanks
     
  38. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    137

    Hey Sient, I finally got around to upgrading again (sorry I haven't responded until now) and it looks like any serialization problems I was running into have been fixed -- everything is running pretty smoothly. There are a few odd errors remaining. The first is that Type LayerMask fields seem to be broken -- I get this weird error:

    Can't add script behaviour . The script needs to derive from MonoBehaviour!
    UnityEngine.GameObject:Internal_AddComponentWithType(Type)
    UnityEngine.GameObject:AddComponent(Type) (at C:\buildslave\unity\build\artifacts\generated\common\runtime\UnityEngineGameObjectBindings.gen.cs:381)
    UnityEngine.GameObject:AddComponent() (at C:\buildslave\unity\build\artifacts\generated\common\runtime\UnityEngineGameObjectBindings.gen.cs:386)
    FullInspector.Modules.LayerMaskEditor:Edit(Rect, GUIContent, LayerMask, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Modules/Common/Editor/LayerMaskPropertyEditor.cs:51)
    FullInspector.PropertyEditor`1:FullInspector.IPropertyEditorEditAPI.Edit(Rect, GUIContent, Object, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditor.cs:75)
    FullInspector.PropertyEditorExtensions:DoEditSlow(IPropertyEditorEditAPI, Rect, GUIContent, Object, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:193)
    FullInspector.PropertyEditorExtensions:Edit(IPropertyEditor, Rect, GUIContent, Object, fiGraphMetadataChild) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:87)
    FullInspector.Internal.fiEditorGUI:EditPropertyDirect(Rect, InspectedProperty, Object, fiGraphMetadataChild, Object) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:336)
    FullInspector.Internal.fiEditorGUI:EditProperty(Rect, Object, InspectedProperty, fiGraphMetadataChild) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:346)
    FullInspector.Internal.ReflectedPropertyEditor:EditProperty(Rect&, Object, InspectedProperty, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:163)
    FullInspector.Internal.ReflectedPropertyEditor:EditInspectedMember(Rect&, Object, InspectedMember, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:223)
    FullInspector.Internal.ReflectedPropertyEditor:EditPropertiesButtons(GUIContent, Rect, Object, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:272)
    FullInspector.Internal.ReflectedPropertyEditor:Edit(Rect, GUIContent, Object, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:324)
    FullInspector.PropertyEditorExtensions:DoEditSlow(IPropertyEditorEditAPI, Rect, GUIContent, Object, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:193)
    FullInspector.PropertyEditorExtensions:Edit(IPropertyEditor, Rect, GUIContent, Object, fiGraphMetadataChild) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:87)
    FullInspector.DefaultBehaviorEditor:OnEdit(Rect, Object, fiGraphMetadata) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/DefaultBehaviorEditor.cs:29)
    FullInspector.BehaviorEditor`1:Edit(Rect, Object) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs:83)
    FullInspector.IBehaviorEditorExtensions:EditWithGUILayout(IBehaviorEditor, Object) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IBehaviorEditorExtensions.cs:20)
    FullInspector.FullInspectorCommonSerializedObjectEditor:ShowInspectorForSerializedObject(Object) (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:175)
    FullInspector.FullInspectorCommonSerializedObjectEditor:OnInspectorGUI() (at /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:191)
    UnityEditor.InspectorWindow:DrawEditor(Editor, Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1231)
    UnityEditor.InspectorWindow:DrawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1028)
    UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:352)
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:187)
    UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:180)
    UnityEditor.DockArea:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:336)

    [C:/buildslave/unity/build/Runtime/Export/GameObjectExport.cpp line 88]
    (Filename: /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Modules/Common/Editor/LayerMaskPropertyEditor.cs Line: 51)

    NullReferenceException: Object reference not set to an instance of an object
    at FullInspector.Modules.LayerMaskEditor.Edit (Rect region, UnityEngine.GUIContent label, LayerMask element, FullInspector.fiGraphMetadata metadata) [0x0003a] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Modules/Common/Editor/LayerMaskPropertyEditor.cs:52
    at FullInspector.PropertyEditor`1[UnityEngine.LayerMask].FullInspector.IPropertyEditorEditAPI.Edit (Rect region, UnityEngine.GUIContent label, System.Object element, FullInspector.fiGraphMetadata metadata) [0x00061] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditor.cs:75
    at FullInspector.PropertyEditorExtensions.DoEditSlow[Object] (IPropertyEditorEditAPI api, Rect region, UnityEngine.GUIContent label, System.Object element, FullInspector.fiGraphMetadata metadata) [0x001dc] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:193
    at FullInspector.PropertyEditorExtensions.Edit[Object] (IPropertyEditor editor, Rect region, UnityEngine.GUIContent label, System.Object element, fiGraphMetadataChild metadata) [0x00058] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:87
    at FullInspector.Internal.fiEditorGUI.EditPropertyDirect (Rect region, FullInspector.InspectedProperty property, System.Object propertyValue, fiGraphMetadataChild metadataChild, System.Object context) [0x00081] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:336
    at FullInspector.Internal.fiEditorGUI.EditProperty (Rect region, System.Object container, FullInspector.InspectedProperty property, fiGraphMetadataChild metadata) [0x00013] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:346
    at FullInspector.Internal.ReflectedPropertyEditor.EditProperty (UnityEngine.Rect& region, System.Object element, FullInspector.InspectedProperty property, FullInspector.fiGraphMetadata metadata) [0x00052] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:163
    at FullInspector.Internal.ReflectedPropertyEditor.EditInspectedMember (UnityEngine.Rect& region, System.Object element, InspectedMember member, FullInspector.fiGraphMetadata metadata) [0x00048] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:223
    at FullInspector.Internal.ReflectedPropertyEditor.EditPropertiesButtons (UnityEngine.GUIContent label, Rect region, System.Object element, FullInspector.fiGraphMetadata metadata) [0x00182] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:272
    at FullInspector.Internal.ReflectedPropertyEditor.Edit (Rect region, UnityEngine.GUIContent label, System.Object element, FullInspector.fiGraphMetadata metadata) [0x0011b] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:324
    at FullInspector.PropertyEditorExtensions.DoEditSlow[Object] (IPropertyEditorEditAPI api, Rect region, UnityEngine.GUIContent label, UnityEngine.Object element, FullInspector.fiGraphMetadata metadata) [0x001dc] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:193
    at FullInspector.PropertyEditorExtensions.Edit[Object] (IPropertyEditor editor, Rect region, UnityEngine.GUIContent label, UnityEngine.Object element, fiGraphMetadataChild metadata) [0x00058] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:87
    at FullInspector.DefaultBehaviorEditor.OnEdit (Rect rect, UnityEngine.Object behavior, FullInspector.fiGraphMetadata metadata) [0x0005b] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/DefaultBehaviorEditor.cs:29
    at FullInspector.BehaviorEditor`1[TBehavior].Edit (Rect rect, UnityEngine.Object behavior) [0x00035] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs:83
    at FullInspector.IBehaviorEditorExtensions.EditWithGUILayout[Object] (IBehaviorEditor editor, UnityEngine.Object element) [0x00035] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/IBehaviorEditorExtensions.cs:20
    at FullInspector.FullInspectorCommonSerializedObjectEditor.ShowInspectorForSerializedObject (UnityEngine.Object target) [0x00013] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:175
    at FullInspector.FullInspectorCommonSerializedObjectEditor.OnInspectorGUI () [0x00012] in /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:191
    at UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) [0x00353] in C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1231
    UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    UnityEngine.Logger:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    UnityEditor.InspectorWindow:DrawEditor(Editor, Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1241)
    UnityEditor.InspectorWindow:DrawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1028)
    UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:352)
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:187)
    UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:180)
    UnityEditor.DockArea:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:336)

    (Filename: /Users/jdufault/Personal/FI/Project/Assets/FullInspector2/Modules/Common/Editor/LayerMaskPropertyEditor.cs Line: 52)

    I also get some weird warnings about "The referenced script on this behavior is missing!" with no other info. When I double click the warning, an invisible object fiBackupSceneStorage is selected. Is there any way to remove this object or have full inspector fix the problems?

    I also get warnings saying "The referenced script on this Behaviour (Game Object 'fiPersistentEditorStorage') is missing!"

    Thanks for your time Sient, Full Inspector has allowed me to prototype a complex rpg much faster than I could have without it, despite any issues I've run into!
     
  39. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602

    For the foldout state, you can use fiDropdownMetadata dropdownState = metadata.GetPersistentMetadata<fiDropdownMetadata>().

    What's the rest of the code to reproduce the inspector? Specifically, the class with Value and GeneratorSlot?
     
  40. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I've sent you a PM.
     
  41. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602

    What version of Unity are you on? I see some LayerMask issues that I'm taking a look into now, but I do not get any error messages.

    You can fix the "removed component" issues by running the menu item Window/Full Inspector/Developer/Remove Metadata. I'll see if I can figure out a way to automate this.
     
  42. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    137
    version 5.3.2p1 -- using full inspector dlls, by the way. The error causes the layer mask and everything after it to not be drawn in the inspector.

    I just noticed that my fiBackupStorage object in FullInspector2_Generated actually has a missing script. Not sure how that happened -- I can fix by downloading the fresh generated directory, right?
     
  43. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Thanks, I'll investigate and get back to you on this.

    Go ahead and remove the missing script - it will get readded automatically. I'm going to add some code that will automatically remove these missing references (they happen when switching from DLL to source-code based builds, I'm guessing because there's both a meta file change and an internal type representation change at the same time).
     
  44. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I've uploaded a new build to access.

    - I rewrote the LayerMask property editor from scratch. Unity doesn't provide an API for a LayerMask property editor; previously, I was faking it by going through Unity's property drawer implementation. This ended up being too buggy, so I wrote a custom LayerMask property editor instead. It should work almost identically.

    - I added some logic to automatically check for and remove missing scripts on any FI-generated object.
     
    sanpats likes this.
  45. Craftomega

    Craftomega

    Joined:
    Sep 3, 2013
    Posts:
    2
    Could I get a demo version for 5.3.1? I'm getting errors from the one from the asset store.
     
  46. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    137
    Awesome, thanks sient! I'll test it out tomorrow.
     
  47. psxcode

    psxcode

    Joined:
    Jan 26, 2014
    Posts:
    26
    Hi sient. How can I make Dictionary editor to show its content sorted by keys. Maybe with some attribute.

    Discovered that CollectionAdaptor::_collectionCache serves as fast collection access elemetnt and can be sorted when InvalidateCache is invoked. This will break reordering, but can be made with special Attribute intentionally.
     
    Last edited: Mar 13, 2016
  48. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Have you implemented this already? I'd be happy to accept a patch if so. Otherwise, I'll try to implement the feature request in the next stable version. I plan on submitting 2.6.3 to the asset store very soon.
     
  49. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I'll update the demo in the next few days.
     
  50. psxcode

    psxcode

    Joined:
    Jan 26, 2014
    Posts:
    26
    Im afraid of monkey patching the core. Definetely will break something somewhere. This need creator's hand. Dictionary rendering is not stable now. Try with Dictionary<string, string[]>. Make few elements with different height. When you remove the whole item - the remaining element's heights get broken. Seems like Heights are not Invalidated on remove.