Skip to content

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

@Lunar2kPS

Description

@Lunar2kPS

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions