godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.59k stars 21.27k forks source link

Godot 4: Visual Script shows variable type icon incorrectly in the members' window #58117

Closed archerallstars closed 2 years ago

archerallstars commented 2 years ago

Godot version

v4.0.alpha2.official [79077e6c1]

System information

Windows 11, Vulkan Clustered, Intel UHD Graphics 620 v30.0.101.1340

Issue description

Godot 4's Visual Script shows the variable type icon in the members' window incorrectly, from type StringName to the end of the available list, as shown in the screenshot below:

Screenshot 2022-02-14 180621

This issue makes a workflow in Visual Script to be very confusing, as the variable type in the members' window, the variable type as shown in the canvas, and the Select Property window, are possible to show 3 different types even from the same variable, as shown in the screenshot below:

Screenshot 2022-02-14 180755

I expect the engine to show the variable type correctly in Visual Script.

Steps to reproduce

  1. Create a variable in Visual Script.
  2. Change its type to StringName or other types from StringName onward to the end of the type list. You will see the variable type icon in the members' window is shown incorrectly and some types will not show their icon at all.

Minimal reproduction project

No response

akien-mga commented 2 years ago

That typically means that an enum for variant types in VisualScript is out of sync with the core implementation.

MisoMosiSpy commented 2 years ago

That typically means that an enum for variant types in VisualScript is it of sync with the core implementation.

Thanks for the tip, I have raised pull request with the fix.