8000 Efficiency · Issue #2 · GieziJo/ScriptableObjectVariant · GitHub
[go: up one dir, main page]

Skip to content

Efficiency #2

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

Open
GieziJo opened this issue Mar 23, 2021 · 0 comments
Open

Efficiency #2

GieziJo opened this issue Mar 23, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@GieziJo
Copy link
Owner
GieziJo commented Mar 23, 2021

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.

@GieziJo GieziJo added the enhancement New feature or request label Mar 23, 2021
@GieziJo GieziJo self-assigned this Mar 23, 2021
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
0