Skip to content

Efficiency #2

Description

@GieziJo

The attribute [SOVariant] only acts as tagger, which is then looked for in SOVariantAttributeProcessor:OdinPropertyProcessor -> ProcessMemberProperties, where the first line reads:

if(!Property.Attributes.Select(attribute => attribute.GetType()).Contains(typeof(SOVariantAttribute)))
    return;

The problem with this is that SOVariantAttributeProcessor is thus set to be called for every ScriptableObject:

public class SOVariantAttributeProcessor<T> : OdinPropertyProcessor<T> where T : ScriptableObject

There is probably a way to directly call SOVariantAttributeProcessor from the attribute, but I haven't found how.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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