Open Raidriar796 opened 2 weeks ago
It should be System.Nullable<TextureFilterMode>
to get the nullable form. However, TextureFilterMode?
should have been accepted as well.
Ah, I didn't know it was specifically System.Nullable
. I tried different variations and got close to System.Nullable
but never thought to try it that specifically, but in hindsight it was pretty obvious given stuff like System.Single
for Floats. Thanks.
For anyone wondering, int?
is just syntactic sugar for System.Nullable<int>
- but the behavior is certainly inconsistent
I feel that #427 should've covered easier typing for Nullable types too.
I feel that #427 should've covered easier typing for Nullable types too.
Seems to be inconsistent at the moment, int?
at the top works, but the enum here doesn't.
All enum types are currently exhibiting this behavior.
Non-syntactic Sugar
System.Nullable<ExceptionAction>
Syntatic Sugar
ExceptionAction?
@Raidriar796 It might be worth updating this issue since this is impacting enum
types in general and not specifically the TextureFilterMode
one.
Updated the title and original comment to focus more on enums in general, but still focused on TextureFilterMode as the lead example due to potential content breakage.
Describe the bug?
Nullable enum types require that you enter
System.Nullable<T>
, which is inconsistent with more generic nullable types likeint?
. This is exemplified by the recent change to the Filter Mode setting on StaticTexture2D, where all components usingTextureFilterMode
as the type have drives/references broken, and can only be fixed by using the Pack Nullable Protoflux node or by replacing components with equivalents usingSystem.Nullable<TextureFilterMode>
.To Reproduce
TextureFilterMode
, such asValueField<TextureFilterMode>
TextureFilterMode?
(It will say invalid type)ValueMultiDriver<TextureFilterMode>
(it doesn't work)Expected behavior
You should be able to get nullable enums by appending "?" to the type name like more generic types, and potentially migrate existing components of type
TextureFilterMode
to instead useTextureFilterMode?
to keep content from breaking.Screenshots
This is showing that
TextureFilterMode?
isn't valid This is showing that it is valid for other types such asint?
This is what happens when you drive the Filter Mode on a StaticTexture2D component This is showing that is can still be worked with by using Pack NullableResonite Version Number
Beta 2024.5.3.1229
What Platforms does this occur on?
Windows, Linux
What headset if any do you use?
No response
Log Files
2024.5.3.1229 - 2024-05-03 15_23_21.log
Additional Context
I recently made an update to a world that included a lower quality mode that changed the textures to use Trilinear instead of Anisotropic with level 16, and this recent update every drive of type
TextureFilterMode
related to this feature was broken. I have since removed it because I actually prefer the texture filtering of said world to be controlled by user settings instead of in world settings.Reporters
@Raidriar796 / raidriar796