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

[Request] AnimatorState Attribute #355

Open
TiredOfEverything opened this issue May 3, 2023 · 1 comment
Open

[Request] AnimatorState Attribute #355

TiredOfEverything opened this issue May 3, 2023 · 1 comment

Comments

@TiredOfEverything
Copy link

An attribute that fills a dropdown with all the names of the possible Animator states for an Animator.

@TylerTemp
Copy link

I've implement one on my own project. Though I did not make it a standalone one, but here you can change it as one you need:

  1. the struct itself, not need for modification: https://github.com/TylerTemp/SaintsField/blob/master/Runtime/AnimatorState.cs

  2. the attribute, delete the inherented interface and non-need properties: https://github.com/TylerTemp/SaintsField/blob/master/Runtime/AnimatorStateAttribute.cs

  3. the drawer: https://github.com/TylerTemp/SaintsField/blob/master/Editor/Drawers/AnimatorStateAttributeDrawer.cs

    1. change SaintsPropertyDrawer to PropertyDrawer
    2. change GetFieldHeight to override GetPropertyHeight and adjust parameters as needed.
    3. change DrawField to override OnGUI and adjust parameters
    4. delete all not-need functions, extra information helper, error handings, etc.

And should do the work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants