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

SerializableCallbackDrawer Subclass Return Types #7

Open
mooreleo opened this issue Mar 3, 2019 · 0 comments
Open

SerializableCallbackDrawer Subclass Return Types #7

mooreleo opened this issue Mar 3, 2019 · 0 comments

Comments

@mooreleo
Copy link

mooreleo commented Mar 3, 2019

The method drop down in the inspector panel does not consider methods with return types that are sub-types of the SerializableCallback class type argument.

Suggest changing line 172 of SerializableCallbackDrawer to the following:

// accept return type and sub-types of return type
if (returnType != null && method.ReturnType != returnType && !method.ReturnType.IsSubclassOf(returnType)) continue;

There may be other areas in the project that can also benefit from such logic.

Nice job on the project though, this has solved my problem very well =)

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

1 participant