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

[EditorButtonAttribute] Method call not work in nested class. #44

Open
SirLpc opened this issue May 19, 2022 · 2 comments
Open

[EditorButtonAttribute] Method call not work in nested class. #44

SirLpc opened this issue May 19, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@SirLpc
Copy link

SirLpc commented May 19, 2022

class RootClass : ScriptableObject
{
public NestedClass childObj;
}

[Serializable]
class NestedClass
{
[EditorButton(nameof(CallMyMethod))]
public string testField;

// Method here in nested class wont be called, but in the parent ScriptableObject will work.
private void CallMyMethod()
{
     // Will not be called, but expected!
}

}

@arimger
Copy link
Owner

arimger commented May 19, 2022

Yup, I know. Unfortunately, decorators have no idea on which properties they are displayed, that's why [DynamicHelp] and [EditorButton] won't work in nested classes. I have this on my TODO list, but thanks for the issue anyway.

@arimger arimger self-assigned this May 19, 2022
@arimger arimger added the enhancement New feature or request label May 19, 2022
@SirLpc
Copy link
Author

SirLpc commented May 19, 2022

Yup, I know. Unfortunately, decorators have no idea on which properties they are displayed, that's why [DynamicHelp] and [EditorButton] won't work in nested classes. I have this on my TODO list, but thanks for the issue anyway.

OK, get it!

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

2 participants