Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add SerializedDictionary support #84

Open
Nitero opened this issue Dec 18, 2024 · 0 comments
Open

[FEATURE] Add SerializedDictionary support #84

Nitero opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Nitero
Copy link

Nitero commented Dec 18, 2024

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
{
}
@Nitero Nitero added the enhancement New feature or request label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants