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. WiktorWasowski

    WiktorWasowski

    Joined:
    Dec 23, 2012
    Posts:
    15
    @SugoiDev Thanks for the solution, although I was hoping it's something way simpler (like adding some kind of an attribute). However, it's good to know that setting a default value of a property is a feature available in C#6. Given I'm not in a big hurry with this functionality, the best solution for me will probably be to just wait until Unity guys finish updating their compiler, as a beta build with C#6 support is already available.
     
  2. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Ah, this is a interesting idea. I've implemented it in https://github.com/jacobdufault/fullinspector/commit/2e738ac300b7b31cb06805249a09a911c5349c66.

    One of the big downsides here is that object references will be shared between the prefab and the instance. As a result, I've made it so that it is opt-in per behavior, ie, you need to call `behavior.SharedStatePrefabInstantiation = true;'` to get the effect. I've also made the logic a bit more robust with detecting which object was the prefab when doing the copying.
     
  3. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    It's been awhile since I last used protobuf-net, but from I recall it will leave empty collections as null instead of allocating an instance for them. I think inheritance has some gotchas too, but I don't recall them right now.

    il2cpp/AOT platform support also doesn't work very well since protobuf-net gets it's speed from JIT compiling the serializers. I have some code that allows you to use protobuf-net's AOT compilation, but it only works so well. One of the big problems is integrating with Unity's build system.

    I'd recommend continuing to use Full Serializer or Json.NET. If you need faster performance, I would migrate the specific behaviors/etc as needed to Unity's serialization system, since that is faster.
     
  4. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I've filed this issue to track work here: https://github.com/jacobdufault/fullinspector/issues/177.

    Note that you can use a [CustomAttributePropertyEditor(...)] instead. Full Inspector works with PropertyDrawer's only because it automatically generates a PropertyEditor for a PropertyDrawer.
     
  5. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Please open up a github issue, that definitely seems like bad behavior. If you could include a repro project that'd be great! Thanks!

    Also, do the performance problems go away if you are not inspecting anything? I would also recommend testing in a player.
     
  6. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Unity's == operator can't be called from multiple threads :(, so this breaks multithreaded serialization.
     
  7. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Feel free to send me an email if you're not happy with the product.
     
  8. sunnysun

    sunnysun

    Joined:
    Jul 24, 2015
    Posts:
    13
    Hi. I have encountered a problem where abstract class serialization doesn't seem to work on mobile. On the unity editor it works well. Is there anyway to fix this issue?
     
  9. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I'll take a look - would you mind posting some code that reproduces the problem?
     
  10. FBones

    FBones

    Joined:
    Aug 28, 2016
    Posts:
    73
    I tried using the free trial today (using Unity 5.4.1f1) and got this error: UNetWeaver error: NetworkBehaviour BaseNetworkBehavior`1 cannot have generic parameters

    Some searching took me to this github ticket., but the error I'm getting seems a bit different and is not fixed.

    Is there an updated trial?

    Full trace

    UNetWeaver error: NetworkBehaviour BaseNetworkBehavior`1 cannot have generic parameters
    UnityEngine.Debug:LogError(Object)
    Unity.UNetWeaver.Log:Error(String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:20)
    Unity.UNetWeaver.NetworkBehaviourProcessor:process() (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetBehaviourProcessor.cs:52)
    Unity.UNetWeaver.Weaver:processNetworkBehaviourType(TypeDefinition) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1068)
    Unity.UNetWeaver.Weaver:CheckNetworkBehaviour(TypeDefinition) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1559)
    Unity.UNetWeaver.Weaver:Weave(String, IEnumerable`1, IAssemblyResolver, String, String, String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1668)
    Unity.UNetWeaver.Weaver:WeaveAssemblies(IEnumerable`1, IEnumerable`1, IAssemblyResolver, String, String, String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1763)
    Unity.UNetWeaver.Program:process(String, String, String, String[], String[], IAssemblyResolver, Action`1, Action`1) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:34)
    UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)



    A second error I get is almost certainly related:

    Failure generating network code.
    UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
     
  11. FBones

    FBones

    Joined:
    Aug 28, 2016
    Posts:
    73
    I have a quick question:

    Using full Inspector, can you modify properties on a Monobehavior in the Inspector and have it "stick'?

    Can you do this if you are only using [fiInspector]?

    I started using a new custom editor from the asset store today that would expose properties but they could not be edited and persist (except for properties on scriptableObjects).
     
  12. FBones

    FBones

    Joined:
    Aug 28, 2016
    Posts:
    73
    Follow-up question: using Full Inspector, can you modify a property on a scriptableObject (in the editor) and have that change persist across sessions?
     
  13. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
  14. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    Please also update for Unity 5.5Beta compatibility.
     
  15. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    at unity 5.5beta, i receive the following message from unity.

    Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs(108,13): error CS0103: The name `Profiler' does not exist in the current context
     
  16. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    i fixed and i add a code which is "using UnityEngine.Profiling;" in IBehaviorEditor.cs.

    according to http://forum.photonengine.com/discussion/8327/unity-5-5-0b3-gives-errors
    in version 5.5.0 Unity changed the namespace of the Profiler class.
    Profiler class moved from UnityEngine namespace to UnityEngine.Profiling'.
     
    sanpats likes this.
  17. Mooshoo-Labs

    Mooshoo-Labs

    Joined:
    Aug 21, 2014
    Posts:
    20
    Hi @sient,

    I have a empty unity project (Unity v5.4.0f3), two classes (as shown below) and FullInspector-2.6.4 (08-24-2016 at 0953AM).

    TestScriptableObject class:
    Code (CSharp):
    1. using System.Collections.Generic;
    2.  
    3. using UnityEngine;
    4.  
    5. using FullInspector;
    6.  
    7. public class TestScriptableObject : BaseScriptableObject
    8. {
    9.     [SerializeField]
    10.     private List<TestBaseObject> _testBaseObjects;
    11. }
    TestBaseObject class:
    Code (CSharp):
    1. using System;
    2.  
    3. using UnityEngine;
    4.  
    5. using FullInspector;
    6.  
    7. [Serializable]
    8. public class TestBaseObject : BaseObject
    9. {
    10.     [SerializeField]
    11.     private string _stringField;
    12. }
    Every time I tried to add an item for the _testBaseObjects list unity throws that error endlessly:
    As pointed out by the log the offending piece of code is located in the fiISerializedObjectUtility.cs at line 136.

    Problem: The C-style cast will throw an error if it fails. In that case it fails because TestBaseObject does not inherit from UnityEngine.Object.
    Code (CSharp):
    1. var unityObj = (UnityObject)obj;
    2. if (unityObj != null)
    3.     fiLateBindings.EditorUtility.SetDirty(unityObj);
    Proposed solution: Use the as operator so if the cast fails it will assign null to the unityObj. I think that what you meant to do anyway since you are doing a null check just after the cast.
    Code (CSharp):
    1. var unityObj = obj as UnityObject;
    2. if (unityObj != null)
    3.     fiLateBindings.EditorUtility.SetDirty(unityObj);

    I went ahead and implemented the proposed fix and it made the error go away however I have not had the time to test extensively enough to make sure the fix is not breaking other parts of the code. Would you be able to have a look at the problem as well as the proposed solution and comeback to me to confirm whether or not the fix is viable.

    Thanks,
    T.
     
    Last edited: Nov 28, 2016
  18. Benjamin_Overgaard

    Benjamin_Overgaard

    Joined:
    Jul 20, 2015
    Posts:
    17
    Is it possible to disable inline editing for certain variables?

    I have a somewhat large SharedInstance public field which takes up a lot of performance when rendered and I think it's because of inline editing.
     
  19. ZorbaTHut

    ZorbaTHut

    Joined:
    Mar 19, 2014
    Posts:
    21
    Is there a better option, then? Because I'm not really using multithreaded serialization, but I'm definitely not okay with it bringing the game to a complete performance halt.
     
  20. Deleted User

    Deleted User

    Guest

    After removing this asset, I'm getting ghost objects.
     
  21. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    86
    Hi there,

    I dont know if someone already asked about this subject so, sorry if its a duplicated question..

    Here we go.

    I need (as everyone else..) the smallest code possible to get better performance in WebGL build.
    So, first question: how many kb full inspector will insert in generated javascript code?
    Second question: is there a way to get rid of this?

    Thanks
     
  22. Narendraom

    Narendraom

    Joined:
    Jul 8, 2015
    Posts:
    35
    Hi , I have purchased full inspector package , and really its great, but I want to add some more stuff like add a button below dictionary and also want to inspect my methods. How can i achieve this if tweaking is possible please let me know or any better option you have please guide me. Thanks in advance.
     
  23. WiktorWasowski

    WiktorWasowski

    Joined:
    Dec 23, 2012
    Posts:
    15
    Hello,

    Is it possible to serialize non-automatic properties?
    The following property doesn't show in the inspector despite being public:

    Code (CSharp):
    1. public Weapon weapon
    2. {
    3.     set
    4.     {
    5.         item = weapon;
    6.     }
    7.     get
    8.     {
    9.         return (Weapon)item;
    10.     }
    11. }

    It becomes visible when I add [SerializeField], but I can't drop anything there anyway. Is it an intentional behavior or some kind of a limitation?

    PS. If it matters, item property is of type Item, while the Weapon class inherits from Item.



    EDIT:
    Forget I asked. I made a mistake and typed "item = weapon" instead of "item = value", hence the problem. Although, the interesting thing is that the "public" keyword is still not enough to make the property appear in the inspector. [SerializeField] is required.
     
    Last edited: Jan 10, 2017
  24. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    I
    I have the same situation, i downloaded the trial to see if it was worth buying it but i get the exact same errors

    • UNetWeaver error: NetworkBehaviour BaseNetworkBehavior`1 cannot have generic parameters
    • Failure generating network code.
      UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
     
  25. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Bump.
    Any thoughts on this Sient? One obvious sidenote is that it must happen on the main-thread since it accesses the Unity-API, but it should still be possible.
    An alternative to this is that you allow creation of custom field-attributes that are invoked during serialization.
     
  26. MapMan

    MapMan

    Joined:
    Oct 27, 2013
    Posts:
    38
    Hi! I'm having a problem with FullInspector 2.6.3 (from AssetStore). At first, everything seems to work perfectly fine but when I build the project (Android) I get an exception during build:

    Code (CSharp):
    1. Exception caught when deserializing property <setter> with type <MathUtils.PennerAnimator>
    2. System.Exception: Cannot create an instance of an interface or abstract type for MathUtils.ISetter
    The interesting part is that the build completes successfully and the game works. This is on Unity 5.3.2f1. Now, after updating to Unity 5.5.0f3 the error is still there but this time around the unity cloud build doesn't like that error anymore and it prevents the build from finishing successfully.

    Here's the full stack trace: https://hastebin.com/vawoxiqozo.tex
    Here's a snippet that might shed more light at what is actually being serialized: https://hastebin.com/rijupakuta.cs

    If you need more information then let me know and I will provide anything you need. Thanks in advance.
     
  27. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    2.6.3 is old. Download the latest version from here: https://github.com/jacobdufault/fullinspector/releases/tag/v2.6.8
     
  28. MapMan

    MapMan

    Joined:
    Oct 27, 2013
    Posts:
    38
    So the changelog in the repo saying latest version is 2.6.4 is outdated? Moreover, are you aware of the issue and has it been addressed or are you just telling me to try the new version and see what happens?
     
  29. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    Well I pointed out the latest version, do whatever you want with it. I am not the developer of this asset. 2.6.3 is almost a year old.
     
    MapMan likes this.
  30. MapMan

    MapMan

    Joined:
    Oct 27, 2013
    Posts:
    38
    Ok thanks @sanpats. So I direct my question to @sient: has this issue been addressed?
     
  31. MapMan

    MapMan

    Joined:
    Oct 27, 2013
    Posts:
    38
    I updated FullInspector to 2.6.8, using prebuilt DLLs. In editor, everything seems to work fine and nothing got lost when updating the plugin. I followed the sure-fire way explained here: http://jacobdufault.github.io/fullinspector/guide/#docs/upgrading. Given that, when I build to Android device the errors I described earlier are indeed gone but FullInspector seems to have a serious problem loading: https://hastebin.com/jebodireda.pas
    The exception is repeated dozens of times, probably each time it tries to deserialize something. Any ideas?
     
  32. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    86
    @sanpats >>
    Hi there,

    I dont know if someone already asked about this subject so, sorry if its a duplicated question..

    Here we go.

    I need (as everyone else..) the smallest code possible to get better performance in WebGL build.
    So, first question: how many kb full inspector will insert in generated javascript code?
    Second question: is there a way to get rid of this?

    Thanks
     
  33. Ulnari

    Ulnari

    Joined:
    Feb 9, 2014
    Posts:
    15
    Since the asset store package is outdated, I manually upgraded from 2.6.2a to 2.6.8 by performing the following steps:

    1.) Get sources
    FullInspector (FI) 2.6.8 source:
    https://github.com/jacobdufault/fullinspector/releases/tag/v2.6.8

    FullSerializer (FS) source:
    https://github.com/jacobdufault/fullserializer

    2.) Backup old project, and delete FullInspector2 directory

    3.) Copy FI source/Assets/FullInspector2 directory to your project's Asset dir

    4.) Copy contents of FS source/Assets/FullSerializer/Source into your project/Assets/FullInspector2/Serializers/FullSerializer

    5.) If your project relies on other serializers (e.g. JsonNet) you can unpack the needed package from Assets/FullInspector2/Serializers

    6.) If you encounter errors in FullInspector2_Generated, you might need to add UNITY_5_5 to the #if directive (I had this in BaseNetworkBehavior.cs)

    Hope this helps someone :)
     
  34. chasepettit

    chasepettit

    Joined:
    Oct 23, 2012
    Posts:
    42
    Wow. I didn't realize the source on the Asset Store was so out of date. I don't mind updating straight from the GitHub repo, but is there any reason the Asset Store package hasn't been updated?
     
  35. MicDE

    MicDE

    Joined:
    Dec 15, 2015
    Posts:
    16
    Hi Ulnari,
    I upgraded FullInspector as described in your post to 2.6.8 with Unity 5.5.2 but using BaseBehavior as Extemsion in replacement to MonoBehavoir led to a compiler error:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using FullInspector;
    5.  
    6. public class fsTest : BaseBehavior {
    7.  
    8.     // Use this for initialization
    9.     void Start () {
    10.        
    11.     }
    12.    
    13.     // Update is called once per frame
    14.     void Update () {
    15.        
    16.     }
    17. }
    18.  
    compiler error:
    Anything I left out?

    Best
    Mic
     
  36. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    You need select serializer. Maybe you delete FullInspector2_Generated folder when update?
    Actually, BaseBehavior - not part of dll or source code. Its generated class and asset generate it when you select serializer. Its looks like BaseBehavior : BaseBehavior<FullSerializer> if you use FullSerializer.
     
  37. MicDE

    MicDE

    Joined:
    Dec 15, 2015
    Posts:
    16
    Argh, While updating the serializer default setting seemed to get lost. I reselected and now everything is fine. Thanks for the hint, mf_adreich!
    Best
    Mic
     
  38. NeonTanto

    NeonTanto

    Joined:
    Jun 19, 2013
    Posts:
    156
    No problem, I was glad to help you. =)
     
  39. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    76
    Hi,

    Is there a FAQ somewhere?

    cheers
     
  40. aitchest-of-dees

    aitchest-of-dees

    Joined:
    Dec 28, 2013
    Posts:
    73
    After spending half the day feeling like I was taking crazy pills, I have determined that Full Inspector is creating objects. I have a Player Icon Script, it has a Controller Info object. By default this is null. It is supposed to be null until it is assigned a controller.

    However, when I run my game, and click on a Player Icon in the editor, Full Inspector creates and populates this object. I was only able to figure out that this was happening because I put a default constructor in my Controller Info that raises an error to try to figure out where the heck these objects were coming from. Here's the stack trace:

    Code (CSharp):
    1. Nothing should ever call this
    2. UnityEngine.Debug:LogError(Object)
    3. ControllerInfo:.ctor() (at Assets/scripts/Classes/ControllerInfos.cs:226)
    4. System.Activator:CreateInstance(Type, Boolean)
    5. FullInspector.InspectedType:CreateInstance() (at Assets/FullInspector2/Core/Utility/InspectedType.cs:132)
    6. FullInspector.Internal.ReflectedPropertyEditor:GetElementHeight(GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:356)
    7. FullInspector.PropertyEditorExtensions:GetElementHeight(IPropertyEditor, GUIContent, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:256)
    8. FullInspector.Internal.fiEditorGUI:EditPropertyHeightDirect(InspectedProperty, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:367)
    9. FullInspector.Internal.fiEditorGUI:EditPropertyHeight(Object, InspectedProperty, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:372)
    10. FullInspector.Internal.ReflectedPropertyEditor:GetElementHeight(GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:395)
    11. FullInspector.PropertyEditorExtensions:GetElementHeight(IPropertyEditor, GUIContent, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:256)
    12. FullInspector.Internal.AbstractTypePropertyEditor:GetElementHeight(GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/AbstractTypePropertyEditor.cs:98)
    13. FullInspector.PropertyEditorExtensions:GetElementHeight(IPropertyEditor, GUIContent, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:256)
    14. FullInspector.Internal.fiEditorGUI:EditPropertyHeightDirect(InspectedProperty, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:367)
    15. FullInspector.Internal.fiEditorGUI:EditPropertyHeight(Object, InspectedProperty, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:372)
    16. FullInspector.Internal.ReflectedPropertyEditor:GetElementHeight(GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:395)
    17. FullInspector.PropertyEditorExtensions:GetElementHeight(IPropertyEditor, GUIContent, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:256)
    18. FullInspector.DefaultBehaviorEditor:OnGetHeight(Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/DefaultBehaviorEditor.cs:47)
    19. FullInspector.BehaviorEditor`1:GetHeight(Object) (at Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs:112)
    20. FullInspector.IBehaviorEditorExtensions:EditWithGUILayout(IBehaviorEditor, Object) (at Assets/FullInspector2/Core/Editor/IBehaviorEditorExtensions.cs:17)
    21. FullInspector.FullInspectorCommonSerializedObjectEditor:ShowInspectorForSerializedObject(Object) (at Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:177)
    22. FullInspector.FullInspectorCommonSerializedObjectEditor:OnInspectorGUI() (at Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:193)
    23. UnityEditor.DockArea:OnGUI()
    Is this expected behavior? I am running 2.6.3
     
  41. CraigGraff

    CraigGraff

    Joined:
    May 7, 2013
    Posts:
    44
    Is it a known issue that refactoring a script (changing the order of serialized variables, for example) seems to cause FullInspector/FullSerializer to lose all inspector data? Is there some way to prevent this?
     
    Last edited: Apr 8, 2017
  42. M0rph3v5

    M0rph3v5

    Joined:
    Aug 15, 2012
    Posts:
    24
    Is it possible to add GUILayout.Button's to a custom BehaviourEditor, since every time I try to do this in the OnBeforeEdit for example I get errors regarding GUILayout en repainting and stuff. I just want to be able to see my Dictionaries in the default inspector to be honest :(
     
  43. aitchest-of-dees

    aitchest-of-dees

    Joined:
    Dec 28, 2013
    Posts:
    73
    Well I'm pulling Full Inspector out of my project. When it works as expected, it is a life saver. But lately all it is doing is causing insane errors that make no sense.

    In my previous post, I mentioned it was constructing objects that are supposed to be null. This weekend I ran into the opposite issue on my laptop, where initialized lists (that are never supposed to be null) were reporting null reference errors in the unity Start method. When I pull out Full Inspector, everything works as expected.

    I really don't know what is going on under the hood with this plugin, but beyond trashing my scenes with invisible objects that I need another plugin just to delete, with these new issues I'm finding are wasting so much of my time that it is no longer worth putting up with it.
     
  44. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    The latest version is not 2.6.3, it's 2.6.8. It can be obtained here: https://github.com/jacobdufault/fullinspector/releases

    2
    .6.3 is quite old and outdated, but it seems the dev is no longer update the asset store version.
     
  45. ldlework

    ldlework

    Joined:
    Jan 22, 2014
    Posts:
    46
    Hello. How can I override OnEdit in a BehaviorEditor such that I can iterate over the fields and properties of the edit target to conditionally decorate/modify its rendering? In otherwords, inside of OnEdit, given a property/field name, how can I draw the default stuff for just that field?
     
  46. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    Just trying out Unity 2017.2b2 and it looks like this causes a warning from FI:

     
  47. Shrubokrant

    Shrubokrant

    Joined:
    Oct 2, 2016
    Posts:
    80
    Hi!

    I found a critical issue with the Fullinspector serialization on the unity 2017 version. It seems that Animation curves in a BaseBehavior aren't being serialized, and despite all my effort (including reinstalling FullInspector, and reimporting everything after deleting library and temp folders) I cannot make Animation Curves work with full inspector at all.

    What happens is that if a curve was set prior to a class being derived from BaseBehavior, it is still visible but not editable, but if it is a newly created object the field will remain blank no matter how much I try to change it.

    I have them everywhere so that's quite a blocker :/

    Any idea of a work around?
     

    Attached Files:

  48. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395

    Are you using the latest version from Github or from the asset store?
    The asset store version is quite outdated.

    See: https://github.com/jacobdufault/fullinspector/
    I'm using FI with Unity 2017 and haven't noticed anything unusual so far, but I don't rely on it for serialization. Just for custom inspectors.


    Before you fall into the trap of relying too much on special serialization, I suggest you read this other issue: https://github.com/vexe/VFW/issues/88#issuecomment-213857086
    Gist: don't rely on special serialization. Keep your serialized data as simple as possible.


    Also, if you're starting a new project, I would recommend reading this issue on the current development status: https://github.com/jacobdufault/fullinspector/issues/203
    Gist: I don't recommend adding FI to new projects at this time.
     
    Akshara and Aurigan like this.
  49. Shrubokrant

    Shrubokrant

    Joined:
    Oct 2, 2016
    Posts:
    80
    Yes, using the last github version!
    I do not have anything else than interface serialization in my data structure, nothing fancy like nested dictionaries or something ;)
    Not starting a new project no, I've been working on it for a year now. However I did already get rid of full inspector, it's not reliable enough anymore. I switched to Odin Inspector almost seamlessly, and so far it's been great :)
     
  50. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395
    Yeah, Odin seems pretty good. Still, their attribute based inspectors aren't even close to how cool the tkEditor system is, for now. I'm expecting great things from them.