Skip to content

Support properties in member classes and structs #47

Description

@fydar

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;
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions