-
Notifications
You must be signed in to change notification settings - Fork 7
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
NotNullFinder fails to report Null entries on Arrays #8
Comments
+1 |
Would really love that, is that something you can add? |
Thanks for both of your feedback - it's helpful to know what people would want with it, and that people are using this! I don't have a lot of bandwidth right now to work on this project, but this should be doable since NotNull uses a PropertyDrawer (which replaces the way the property is drawn entirely, so we can do whatever we want). Here's some notes to get future me started (or anyone who wants to do a Pull Request for Hacktoberfest!) unity-notnullattribute/Assets/RedBlueGames/NotNullAttribute/Editor/NotNullAttributeDrawer.cs Line 93 in 09abe84
|
Hey @edwardrowe, Actually, for me there is no problem with the inspector itself, it shows pretty well the null warning even within arrays and dictionaries. However, the 'Not Null Finder' is a different story, it seems like that ReflectionUtility.GetFieldsWithAttributeFromType won't return fields within arrays/dictionaries. |
Ok I am able to see what you're saying. I'm going to rename this issue to better reflect the problem. Also some repro steps to clarify:
I'd expect a log entry like:
|
Apologies for the confusion. My fault totally - the description of the task says it right front and center what you're talking about. |
When you apply a NotNullAttribute to an array, each element gets the warning in the editor as expected, which is sweet. However, when doing the "NotNull" search no errors are given for null members.
Expected behaviour (WIP):
The text was updated successfully, but these errors were encountered: