Interfaces inside vanilla classes are not serialized

Issue #243 invalid
Former user created an issue


First of all, great tool! I'm in the process of switching from FullInspector to Odin and I'm having an issue with the following example:

using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;

public interface MyInterface

public class InterfaceImplementation: MyInterface
    public string test;

public class SomeClass
    public MyInterface wontShow;
    public InterfaceImplementation willShow;

public class MyScriptableObject : SerializedScriptableObject
    public SomeClass someClass;
    public MyInterface willShow;

As the name implies, SomeClass.wontShow will not be shown in the inspector (and I assume, won't be serialized).

Am I missing something?

Comments (1)

  1. Tor Esa Vestergaard

    Odin's serialization is more frugal and conservative than Full Inspector's. Odin won't serialize the members that it knows Unity will serialize, unless you force it to. You can find more details here.

  2. Log in to comment