Avoiding warnings on nodes with custom variables

Is it possible to avoid the orange highlighting of nodes when plugging in empty custom variables as parameters?
Apparently VS is assuming the Input will be NULL when executing the node, but this will not be the case because the variable will be assigned earlier during runtime.

I think the warning would be justified if there was no input at all and the default value would be null - but after plugging in a variable, it would be better to just not highlight the node orange, but instead highlight it red during runtime if an object that is null really ends up there. (That’s also how Unreal does it in Blueprints and i think this works quite well).

Right now, we’re working with a lot of custom nodes, and my design team is facing orange “warnings” all over their graphs, which are actually more distracting than helping.

In the custom nodes i don’t want to remove the coded “Requirement” tho, because IF there was really no input, then the orange warning would be totally justified and helpful!

Any ideas anyone? Am i missing something? Is this still work in progress or actually the intended way and not going to change in the future?

8007932--1030253--visualScriptingWarning.jpg

That’s how it has worked since the beginning. I don’t think Unity have outlined any plans in relation to predictive debugging, they’re focusing on replacing the runtime and all of UI amongst other major changes.

There’s also nothing you can do about it right now, as far as I’m aware. It’s akin to IDE warning you that a value might be null at runtime and that you might want to add a null check.

Well, hopefully “all of UI” contains warnings within the UI as well. :slight_smile:

If there are really no changes planned to this system, then @ -Devs: please consider this as feedback:

It would be great if Null-Warnings would only fire when an Input is null for sure ( = No Variable plugged in + default value is null). This would make the graphs cleaner and real issues much easier to identify.

Also (to bring up another point for the change I’m asking):

If the main argument is that the IDE warns the user that a value MIGHT be null at runtime, the setup in the image below should throw the same warning. To me, this then looks like a consistency issue.

8009336--1030589--vsissue.jpg

At the moment, the only thing you can do, is to disable the “Predict potential Null References” option in the Preferences panel. You won’t see any warnings in your graphs about possible null refs, if it is unchecked.