You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
}
}
The text was updated successfully, but these errors were encountered:
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.
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.
I've just bumped into this too, it would be great if buttons in nested classes could directly invoke methods in those same nested classes... is there a way to do it without putting a proxy method in the root class? Something like
[EditorButton("myNestedClassInstance.MyMethod", "Do the thing", activityType: ButtonActivityType.OnPlayMode)]?
class RootClass : ScriptableObject
{
public NestedClass childObj;
}
[Serializable]
class NestedClass
{
[EditorButton(nameof(CallMyMethod))]
public string testField;
}
The text was updated successfully, but these errors were encountered: