Skip to content

Support non-public fields too #45

Description

@XtroTheArctic

This may not be considered as a bug but I think it is because a serialized field in Unity is a serialized field, no matter if it's public or not.

My icon field is private and serialized but it doesn't display the icon in project view.

[SerializeField] [AssetIcon] Sprite Icon;

To support private serialized Unity fields, GetMembers call in AssetDrawerFactoryLibrary.cs should be changed to this:

var typeMembers = type.GetMembers(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions