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

    GREBENOTS

    Joined:
    Jan 24, 2013
    Posts:
    44
    There is definitely an issue with public List<T> in the public release of Unity5. 5 star asset and eagerly awaiting a fix.

    Can I get a confirmation that a public List<string> variableName = new List<string>(); does not show up properly in the inspector in Unity5 public release? If it's the same as me, it will show the list, but will throw Object Reference exceptions.
     
    Last edited: Mar 4, 2015
  2. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Great! Hope FI works well for you. Let me know if you have any other issues.
     
  3. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I'll be pushing out 2.6 shortly which has fully supports Unity 5. I've PMed you a link to the latest build.
     
  4. Deleted User

    Deleted User

    Guest

    Does this impact performance on Android?
     
  5. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    The only perf impact is during the call to Awake() - objects will take longer to initialize. After that, performance is identical. You can still use the Full Inspector inspectors without paying any performance penalty with fiInspectorOnly, however, this will not allow you to serialize dictionaries and the like.
     
  6. Deleted User

    Deleted User

    Guest

    How significantly does it impact performance?

    Right now I have a serialized List<MonoBehaviour> and then during Awake, I get all interfaces of a certain type in each MonoBehaviour and add them to a non-serialized (since Unity doesn't support it) list<interface>.
     
  7. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Please check your PMs.
     
  8. Boolai

    Boolai

    Joined:
    Nov 13, 2014
    Posts:
    9
    Is it working for unity 5?
     
  9. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Yep, FI has full support for Unity 5. 2.5 should work on Windows but there are some known issues on OSX. These have all been fixed in 2.6 which will be submitted to the asset store within the next day or two.
     
  10. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    2.6 has been submitted to the asset store!

    Here are the highlights:

    - BaseObject, which is like BaseBehavior except for regular types

    Code (csharp):
    1. [Serializable]
    2. public class HelloFullInspector : BaseObject {
    3.      public Dictionary<string, GameObject> dict;
    4. }
    5. public class MyBehavior : MonoBehaviour {
    6.     public HelloFullInspector hi;
    7. }
    8.  
    - [fiInspectorOnly], which enables the Full Inspector inspector without touching serialization

    - Foldouts are now persistent across play-mode! :D

    - A brand new customization mechanism when attributes are not enough, the toolkit. It's way easier than writing custom property editors.

    - Automatic property drawer integration - UnityEvent and the like are now fully supported!

    - DLL support (instead of including FI as source code - this reduces iteration times)

    Here's the full changelog:

    Code (csharp):
    1. For v2.6 (3/5/2015)
    2.  
    3. - Added `BaseObject`, which is like `BaseBehavior` and `BaseScriptableObject` except it derives from `System.Object` and can be used in MonoBehaviours or anywhere else.
    4. - Added `tkCustomEditor` interface for new, easy, but extremely powerful way to customize your inspectors. You don't have to create an editor script!
    5. - Added `[fiInspectorOnly]` which will activate Full Inspector for any class/struct (without serialization support).
    6. - Dropdowns are now persistent!
    7. - [InspectorTooltip] can now be used with methods annotated with [InspectorButton]
    8. - Added DefaultBehaviorEditor{TBehavior}, which easily allows you to create custom behavior editors with a custom editor below/above the default editor.
    9. - [InspectorRange] now supports a step value with [InspectorRange(Step=3)]
    10. - You can now fetch the protobuf-net schema used for serialization with `ProtoBufNetSerializer.GetSchema` [from Jacob Liechty].
    11. - Added `fiSettings.SerializeAutoProperties` which will disable serializing and inspecting auto-properties by default [from Jacob Liechty].
    12. - Added a `WeakReference` property editor (and serialization with Full Serializer)
    13. - [NotSerialize], [fsIgnore], etc now will cause members to be hidden in the inspector on non-UnityEngine.Object types
    14. - Added a viewer for JSON files - simply click a json file in your assets directory and the inspector will display a nice UI for it (read-only).
    15. - Static fields/properties can now be displayed in the inspector with [ShowInInspector]. Note: static fields will not be serialized - as a result, [SerializeField], [fsProperty], etc are prevented from acting like [ShowInInspector] when the member is static.
    16. - Full Serializer now supports partial deserialization
    17. - Various performance improvements for Full Serializer
    18. - Readded Unity 4.3 support so that console exports (ie, PS4) work
    19. - Added the scriptable object manager window (Alt-O or "Window/Full Inspector/Scriptable Object Manager"). This allows you to easily locate and create scriptable objects of any type.
    20. - Added support for `UnityEvent{...}`.
    21. - PropertyDrawers will automatically be used for types which have them.
    22. - Add support for [FormerlySerializedAs] on BaseBehavior/BaseScriptableObject types.
    23. - Better support for dropdown hierarchy mode - dropdown arrows align more nicely now.
    24. - Added [InspectorCategory] which lets you create categories in the inspector.
    25.  
    26. Changes:
    27. - [InspectorRange] will now entirely replace the existing editor.
    28. - Serialized data can now be viewed by pressing `Alt-D`.
    29. - T can now be generic in SharedInstance{T} [from Jacob Liechty].
    30. - OnValidate is now a virtual method; please call base.OnValidate() if you override it (fixes issues where the data inside of OnValidate would not be deserialized)
    31. - Renamed [InspectorNotDefaultConstructed] to [InspectorNullable].
    32. - Fixed rect property editor w/o label
    33.  
    34. Fixes:
    35. - Fixed paged collection editor not showing the last element.
    36. - Serialized content will only be written to the behavior if it is actually different. This improves compatibility with certain source control systems (preventing a checkout of a large number of file)
    37. - Use CSharpName for a type when displayed in the abstract type dropdown and an instance cannot be constructed.
    38. - Reworked CSharpName logic to better handle nested types.
    39. - Various internal changes to support third-party extensions
    40. - Fixed the Apply button in prefab instances.
    41. - Fixed prefab instances values marking themselves as overrides after a script reload if the prefab itself was not loaded into memory.
    42. - Added error recovery when deserializing the wrong object type.
    43. - Call OnValidate in play-mode when the inspector has been modified by the user.
    44. - Corrected generated script when FI2 root directory changes
    45. - Interfaces/abstract types which derive from IList{T} are now supported in the inspector
     
    psxcode likes this.
  11. psxcode

    psxcode

    Joined:
    Jan 26, 2014
    Posts:
    26
    This is awesome, sient. Look at that changelog. Its full of amazing stuff.
    Cant wait to try it.
    These assetstore guys are quite lazy. It takes them forever to approve new version
     
  12. Trung-Hieu

    Trung-Hieu

    Joined:
    Feb 18, 2013
    Posts:
    37
    I am having a small little bug: The [InspectorHeader] does not show correctly when it is put above an array.
     

    Attached Files:

  13. psxcode

    psxcode

    Joined:
    Jan 26, 2014
    Posts:
    26
    You can use this code to bypass the bug
    Code (CSharp):
    1. #if UNITY_EDITOR
    2.     [InspectorHeader("Animation Control"), InspectorMargin(20), InspectorDivider, ShowInInspector, InspectorHidePrimary]
    3.     internal bool __inspector_anim;
    4. #endif
    This method disconnects actual member variable from decorative stuff
     
  14. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Thanks, I've fixed the issue. I will PM you a build that includes the fix.

    Ha, nice workaround. Talk about some fun annotations there :p
     
  15. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Hey everyone,

    As a heads up, 2.6 is now live in the asset store. Make sure to update!
     
    psxcode likes this.
  16. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I have a custom EditorWindow (not inspector) that used the FullInspector list using some code from earlier in the thread but it stopped working in 2.6. I actually posted and deleted my post twice because I kept thinking I figured it out but then something else would stop working... >_>

    I use editor.Edit(), which required a metadata parameter. I was originally getting that by doing this:
    Code (csharp):
    1. var metadata = fiGraphMetadata.GetGlobal(db);
    but it seems GetGlobal() was removed in 2.6. I tried replacing it with this:
    Code (csharp):
    1. metadata = new fiGraphMetadata(new fiUnityObjectReference(db));
    and this almost works, but while I'm able to modify the main fields of objects in the list, I can't edit the fields of nested objects within those objects anymore. For example:
    Code (csharp):
    1. public class Inner {
    2.   public int a;
    3.   public string b;
    4. }
    5.  
    6. public class Outer {
    7.   public int c;   //can edit
    8.   public string d;   //can edit
    9.   public Inner e;  //can see, but can not edit the values
    10. }
    In this case I'm using editor.Edit() to display a list of the "Outer" class.

    I should mention, editing the inner object works fine in the inspector, just not in the Editor Window.
     
    Last edited: Mar 10, 2015
  17. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    fiGraphMetadata.GetGlobal was replaced with fiPersistentMetadata.GetMetadataFor. The metadata persistence system was completely rewritten in 2.6 so that it would be significantly faster (it uses Unity's serializer and only serializes data that requests to be persistent). 2.5 included metadata persistence as well but it was disabled by default because it could lock up the editor for 2-20s.

    If changing the method call doesn't work, then I'll be happy to take a look at the code if you send it to me.
     
  18. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I figured out what was going on; it wasn't related to the nested objects. I had a PropertyEditor that was calling Awake on the object in some cases which was calling BaseBehavior.Awake which was restoring the state each time I changed the value so... turns out I was just doing something really dumb that miraculously didn't actually break until 2.6. ;)
     
  19. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Ha, okay. Glad to hear you found the issue.
     
  20. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi sient, I have some questions/issues:

    1. Created a new empty Unity 5.0 project and imported FI 2.6. Tried to open the Scriptable Object Manager window and got a bunch of repeated console errors:

    IndexOutOfRangeException: Array index is out of range.
    fiScriptableObjectManagerWindow.<Editor>m__76 (.fiScriptableObjectManagerWindow o, FullInspector.tkEmptyContext c) (at Assets/FullInspector2/Modules/ScriptableObjectManager/Editor/fiScriptableObjectManagerWindow.cs:97)
    FullInspector.tk`2+PropertyEditor+<Create>c__AnonStorey10`1[fiScriptableObjectManagerWindow,FullIns

    2. I noticed that in your Samples, SerializationHelpers.SerializeContent<>() doesn't output formatted json. Going through your example for Full Serializer on GitHub, I was able to do this using PrettyJson() (which isn't shown in your API docs btw). Is it possible to do this using that method call, or do I need to use TrySerialize() example from FullSerializer?

    3. Does using the FullSerializer method (rather than SerializationHelpers) allow serializing UnityEngine.Object references?

    4. What are the advantages of using FullSerializer vs Json .NET from the Asset Store? I see both support all platforms, but is there a speed difference?

    5. With Json .NET, I have to specify ObjectCreationHandling.Replace to make sure values are not added to existing collections, but replace them. Does FullSerializer do that by default?

    6. Is it possible to deserialize from a string to ScriptableObjects with Full Serializer? With Json .NET I have to first load the ScriptableObject using Resources.Load, and then use JsonConvert.PopulateObject() to do so.

    Thanks.
     
  21. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Thanks, this has been fixed for the next release. This issue only appears when there are no derived ScriptableObject types in the project.

    SerializationHelpers is just some wrapper code to allow you to easily invoke Json.NET, Full Serializer, protobuf-net, or BinaryFormatter using the same settings that Full Inspector uses - which includes minimized json output for Full Serializer. The example on the Full Serializer github page will work just as well (if not better, since you're closer to the actual APIs).
    [/quote]

    Nope, sorry. UnityObject references are never really actually serialized; instead, they are just "punted" to Unity serialization (ie, BaseBehavior has a List<UnityObject> field which stores all of the UnityObject references).

    Full Serializer is free and serializes basically anything, whereas Json.NET will be more difficult to use in certain scenarios (ie, custom converters with abstract types don't really work in Json.NET). I'm not too sure about a performance comparison between the two.

    If you give it an object reference, then this *should* be the expected behavior. If there's already an object instance a new instance will only be allocated if necessary.

    Yep, just pass in the ScriptableObject reference and full serializer will do the equivalent of JsonConvert.PopulateObject().

    If you're happy with Json.NET for Unity, there probably isn't any reason to switch to Full Serializer. I developed it primarily to support iOS / AOT platforms for Full Inspector (plus it fixes a few issues with Json.NET that I discussed earlier).

    Sure! Let me know if you have other questions.
     
  22. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Thanks for the detailed replies... they really helped.

    Just so you know, I was able to deserialize a json file to a ScriptableObject successfully using the API for FullSerializer (the SerializationHelpers wrapper method didn't work). Actually, when using Json.NET's JsonConvert.PopulateObject()method, I didn't realize until now that values aren't deserializing from the file correctly. Instead, it shows what the current value of the ScriptableObject is, not the values loaded from the file. Although it might be due to my not using Json.NET correctly, FullSerializer still handles it beautifully with minimal fuss.

    FullSerializer also correctly replaces the collection values, rather than adds on to them.

    Is the GitHub example out of date? There is no version of fsJsonParser.Parse() that takes one argument, and I can't assign it to an fsData instance as shown on the page. I had to use:

    Code (CSharp):
    1. string json = File.ReadAllText(MyPath);
    2. fsSerializer _serializer = new fsSerializer();
    3. fsData data;
    4. fsJsonParser.Parse(json, out data);
    5. _serializer.TryDeserialize<MyScriptableObjectName>(data, ref myScriptableObjectInstance);
    I think I'm just going to use FullSerializer from now on. Btw, great job with FullInspector and FullSerializer! I hope you continue your great support!
     
  23. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Are you using the version of Full Serializer included with Full Inspector? It's very likely that you're using an older version of Full Serializer (last few days I've made a number of FS updates).


    Great! Thanks!
     
  24. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    My mistake. I was using the 2.5 version of Full Serializer in that project.

    More questions:

    1. I'm trying to get a better understanding of the new BaseObject. Is it useful for being able to serialize a regular class's Dictionaries and other types that are not shown in the default Unity inspector when instantiating that class in a Monobehaviour (rather than BaseBehavior)? Are there any other uses?

    2. From playing around with a SharedInstance<T>, it seems like it does exactly what a ScriptableObject does but without needing to do a menu item to create it, and without the OnEnable/OnDisable/Destroy/etc. functionality. Is there anything a ScriptableObject can do that a SharedInstance can't if I'm just using it for database functionality?
     
  25. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Yep, that is the primary use case.

    Nope, SharedInstance<T> is just a bit easier to use and has a faster/simpler workflow. It also conveys intent a bit better.
     
  26. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Awesome. Just left a review in the store. Would love to see the Attribute Customization section of the guide fleshed out when you get a chance.
     
  27. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Thanks. Over time I add docs, but for the inspector customization stuff you can use intellisense - all of the inspector customization attributes begin with [Inspector*].
     
  28. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I'm on Unity 4.6.3f1 on OSX

    The last version of FI has some issues with rendering. Some text overlap each other:
    https://www.dropbox.com/s/hbb55klolfq87mv/Screenshot 2015-03-14 18.38.07.jpg?dl=0

    I also had some problems with serialization of some ScriptableObject.
    Adding [NotSerialized] to some readonly properties was not enough. I had to define them as internal to stop FI to serialize them. (I was checking with Show Serialized Data and there was a huge list of GameObject that should not be there)
    This was also randomly causing an exception with Json.net and I was loosing all the data.
    Setting them to internal resolved both the issues.

    On more thing. I was previously using this configuration to have some temporary calculated data visible in the inspector:
    Code (CSharp):
    1. [NotSerialized]
    2. [ShowInInspector]
    3. [InspectorDisabled]
    4. public Dictionary<CarComponents, int[]> componentsCosts = new Dictionary<CarComponents, int[]>();
    5.  
    but after the update It was not showing it anymore in the inspector and I had to change it to
    Code (CSharp):
    1. [ShowInInspector]
    2. [InspectorDisabled]
    3. internal Dictionary<CarComponents, int[]> componentsCosts = new Dictionary<CarComponents, int[]>();
    4.  
    Is it intentional or is a bug?

    Thanks
     
  29. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    The rendering issue is due to the new dropdown code. This issue has been fixed in the next release (I've PM'ed a buld).

    I'm unable to reproduce this. Can you post some code that includes the issue?

    This is a bug - fixed, thanks. This was accidentally introduced because the serialization annotations now also act as a ShowInInspector / HideInInspector.
     
  30. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Hi again! Been working on other projects for a while so I'm not very up to date... Any updates on this, or how one would solve this problem?

    Thanks!
     
  31. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Yep, the recommended workflow here is to use SharedInstance<T>.
     
  32. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    About BaseObject: Do all my custom (non-monobehaviour) classes have to derive from this now, to be serializeable? (Just used the [Object.Serializable] before)

    Thanks!
     
  33. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    On another note: Are there any known bugs that got fixes inc? I do get a lot of errors (I'll PM), and also with multiple properties with [ShowInInspector], the folding doesn't work. It only shows for the first property, then all the rest is included in this fold.
     
  34. beijingmax

    beijingmax

    Joined:
    Mar 15, 2015
    Posts:
    1
    Hey, I'm using the trial version and I get the error reported here:
    https://github.com/jacobdufault/fullinspector/issues/111

    Seems like its fixed in 2.6, but the link to the trial version points to version 2.5.
    Can you update the link so that trial users can get 2.6?
    Thanks!
     
  35. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    You should continue to use [Serializable], but if you want to also have a serialized dictionary or an interface, then you need to derive from BaseObject as well.

    This is definitely unusual - there shouldn't be any error messages. Did you do a clean import?

    I'll try to get the updated trial out within the next week or so when I push 2.6.1.
     
  36. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Okey I'm not sure what's going on, but according to the documentation the behaviour is not correct...

    This will work (show property in inspector):
    Code (CSharp):
    1. [ShowInInspector]
    2. public float derp {
    3.     get;
    4.     set;
    5. }
    This will not:
    Code (CSharp):
    1.  
    2. public float derp {
    3.     get;
    4.     set;
    5. }
    even though:
    Code (CSharp):
    1. public static bool SerializeAutoProperties = true;
    And _none_ of my explicit properties show in the inspector using [ShowInInspector].

    Edit.

    Okey I found the main issue (not second example though) while typing... You've introduced a bug that causes the use of both [ShowInInspector] combined with [NotSerialized] on the same field to cancel eachother out. I use this alot since I rarely want my properties serialized, but I want them showed in the inspector to correctly run the logic when changing values. :)

    Edit2.

    Or did you make that change to disable auto-serialization of explicit properties? So [NotSerialized] is not needed any more for these?
     
    Last edited: Mar 20, 2015
  37. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Explicit properties should always be automatically serialized. Can you PM me or send me an email? I'll send you a build that fixes the [ShowInInspector] and [NotSerialized] issue.

    If the auto-property issue still remains, I'll take a deeper look into it, but I'm not sure I'll be able to reproduce the issue.
     
  38. Snazzle

    Snazzle

    Joined:
    Apr 14, 2014
    Posts:
    8
    There seems to be an issue with text assets not being displayed/previewed in the inspector. Is that happening for anyone else? Unity 5.0.0.p2 personal, Full Inspector v2.6.

    It's not a big problem, just a bit annoying. I wouldn't have thought FI would impact that, but it appears to be the asset responsible.
     
  39. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    This looks like an accidental side effect of the JSON file editor. I'll look into seeing if I can get this fixed, otherwise I'll probably disable the JSON editor by default in the next release. Thanks. You can disable the JSON editor by commenting out line 10 of FullInspector2\Modules\JSON\Editor\fiJsonFileEditor.cs
     
  40. Snazzle

    Snazzle

    Joined:
    Apr 14, 2014
    Posts:
    8
  41. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Hello,
    I have simple class with color field:
    public classElementGizmoScript : BaseBehavior<FullSerializerSerializer>
    {
    [SerializeField]
    private Color color;
    ...
    }

    And I create gizmo with this script like this:
    privatevoid CreateGizmo(SymbolConversionScript symbolConversion, GameObject parentGameObject, Element element)
    {
    #if UNITY_EDITOR
    // instantiate prefab
    var gizmo = (GameObject)PrefabUtility.InstantiatePrefab(symbolConversion.GizmoPrefab);
    gizmo.name ="Gizmo";
    var gizmoScript = gizmo.GetComponent<ElementGizmoScript>();
    gizmoScript.Color =Color.yellow;//symbolConversion.GizmoColor;
    EditorUtility.SetDirty(gizmo);
    #endif
    }

    Problem is that color will still have default value on creation. After I set in in editor hit play and go back to editor changed value is still there. (so it's serialized) But when creating gameobjects through script it's not saved.

    If I inherit from Monobehaviour gameobject will have yellow color. Like expected. It's a bug or I'm loosing some basic concept?

    Thanks
    Peter
     
  42. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I'm reworking some of the editor serialization logic to just work in every scenario (such as this one), but there is a critical bug that is blocking it's release. For the time being, can you add a call to gizmoScript.SaveState() after you change the color of the gizmo?
     
  43. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Hello,
    yes, it's working with explicit SaveState call.

    Thanks
    Peter
     
  44. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I have another question! So, I have a property attribute and property editor, which I use like this to get a custom editor:
    Code (csharp):
    1. [ItemId] public int id;
    That's all working fine. But now I have a class with a List<int>, and I want to use the FullInspector list control, but have each int within the list use the [ItemId] editor. Is there a way to do that easily?
     
  45. chooser

    chooser

    Joined:
    Mar 21, 2015
    Posts:
    13
    Hi
    I just bought FullInspector

    But I got an error...
    Uninstall and install again and again, but nothing to change.
    (See attached screenshot file)
    Build_Settings_and_MenuScene_unity_-_tc-mobile_-_PC__Mac___Linux_Standalone.png

    Also, I got conflicting with JSON.NET (from assetstore)

    JsonDotNet_Source_Linq_LinqExtensions_cs.png

    How can I solve it?
     
  46. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Wow, that's an impressive error. I'll be submitting 2.6.1 shortly, but 2.7 will have all serializers (except FS) unimported by default, which will remove this class of errors.

    You can solve this issue by following this (the "Json.NET" section) in the guide.

    Let me know if you have other questions/issues.
     
    chooser and psxcode like this.
  47. chooser

    chooser

    Joined:
    Mar 21, 2015
    Posts:
    13
    Thanks!!
    I will be waiting for 2.6.1 and 2.7.
    Thank you for your cooperation
     
  48. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    I suspect this may be related to the above mentioned issues, but I'm getting an issue with Unity 5 that wasn't ocuring previously. When I go to access my serialized objects I now get this error:

    Exception caught when deserializing property <clothingItemList> in <ClothingLibrary (ClothingLibrary)>
    System.Runtime.Serialization.SerializationException: Serializable objects must be marked with the Serializable attribute

    My code hasn't changed at all between Unity 4 and Unity 5, however now I cannot access my serialized objects. Is there a fix for that available or is that something that is also being addressed in the 2.7 update?
     
  49. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    Are you using the BinaryFormatter serializer? That sounds like an exception thrown by it. I'm unaware of any bugs in the 2.6 cycle that could be causing any issues like that. My only thought is if the default serializer accidently got changed. If not, can you PM me a build so I can look into it?
     
  50. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    Is the following possible and if yes how?

    I have a list of strings which is populated dynamically. Now in the inspector I would like to have a dropdown which shows me all entries in the list. When selecting one entry that string is assigned to a string variable in that class.

    Even better would be a dynamic enum. I had a look at the EnumBuilder-class but could not figure out how to use it correctly and in combination with Full Inspector.

    Any help is highly appreciated! Thanks!