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

Support properties in member classes and structs #47

Open
Fydar opened this issue Aug 23, 2022 · 0 comments
Open

Support properties in member classes and structs #47

Fydar opened this issue Aug 23, 2022 · 0 comments
Assignees
Labels
✨ enhancement New feature or request

Comments

@Fydar
Copy link
Owner

Fydar commented Aug 23, 2022

Allow the sourcing of an icon from the members of a nested class or struct.

public class NestedStructureAsset : ScriptableObject
{
    [AssetIcon(property = nameof(B.sprite))]
    public B customClass;
}

Workaround

If you require this feature, you can use a property as a workaround for accessing the child members.

public class NestedStructureAsset : ScriptableObject
{
    public B customClass;

    [AssetIcon]
    private B icon => customClass.sprite;
}
@Fydar Fydar added the ✨ enhancement New feature or request label Aug 23, 2022
@Fydar Fydar self-assigned this Aug 23, 2022
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

1 participant