mackysoft / Unity-SerializeReferenceExtensions

Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.
https://qiita.com/makihiro_dev/items/26daeb3e5f176934bf0a
MIT License
763 stars 58 forks source link

[BUG] [SubclassSelector] Does Not Support Concrete Base Class #13

Closed Lunar2kPS closed 2 years ago

Lunar2kPS commented 2 years ago

What happened?

Desired Behavior

It is possible to create an instance of a field in the Unity inspector, on a field marked [SerializeReference, SubclassSelector], whose data type is a concrete, pure C# data.

Actual Behavior

Only <null> shows in the Unity inspector on a field marked [SerializeReference, SubclassSelector], whose data type is a concrete, pure C# data.

Code example:

using System;
using UnityEngine;

public class ReferenceTester : MonoBehaviour {
    [Serializable]
    public class Data {
        public int intValue;
    }

    [SerializeReference, SubclassSelector] private Data example;
}

image image

Package Version

1.1.4

Unity Version

2021.2.15f1

Lunar2kPS commented 2 years ago

Thanks so much! :)

mackysoft commented 2 years ago

This update will be applied soon!