Skip to content

[FEATURE] Add SerializedDictionary support #84

@Nitero

Description

@Nitero

Feature description

I'm not sure if this belongs in here or in the SerializedDictionary plugin that I use, but it would be great if it was compatable out of the box instead of having to make wrappers.

public class Example : MonoBehaviour
{
    [SerializeField]
    private SerializedDictionary<TargetWrapper, float> _configurableTarget; // works

    [SerializeField, SubclassSelector]
    private SerializedDictionary<ITarget, float> _configurableTarget2; // doesnt work
}

[Serializable]
public struct TargetWrapper
{
    [SerializeReference, SubclassSelector]
    public ITarget target;
}

public interface ITarget
{
}

[Serializable]
public class ConcreteTarget : ITarget
{
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions