Fix for GridSensor3D Warning: Cannot pass 1 as Enum "BaseMaterial3D.Transparency" - #61
Fix for GridSensor3D Warning: Cannot pass 1 as Enum "BaseMaterial3D.Transparency"#61Ivan-267 wants to merge 1 commit into
Conversation
|
@edbeeching could you approve this one so that I can merge it? |
|
Interestingly, I do not get above warning. According to the documentation, the enum However, it is always better to use enums instead of numbers so for me this fix would be clean and good. |
I don't quite remember the exact scenario where I got it, but probably it happens when the sensor is used. For example I'm not getting the warning in Godot 4.6.3 when not using the sensor. It's also possible that the warning might not show up in different Godot versions, but even if the warning stopped showing up we can still apply the change. |
Agreed |
Fixes the following warning by replacing the integer with the enum:
Checked with Godot 4.6.1.
Note: Filename in warning log doesn't match as I got the warning on a locally modified sensor with a different filename, but otherwise the fix matches.