Closed BastiaanOlij closed 1 week ago
This is a current limitation, see:
You need to use assign
to deal with this currently
Thanks! Interesting that it used to work fine.
Are you sure? The demo was only changed to use static typing recently, and the array limitations are far older than that
It does indeed seem that this is a fault of the demo code, it's incorrect as the method called returns and Array
not an Array[float]
, see here, the fix is to fix the demo code
Transferred here as this is a (current) issue in the demo code being incorrect and the static type should be Array
, as the return type is such
It'd be possible to change the return type eventually in the engine but it'd break compatibility given the limitations currently I'd say
Tested versions
System information
Windows 10
Issue description
Both movement demos in https://github.com/godotengine/godot-demo-projects/tree/master/xr have the code
var available_rates: Array[float] = xr_interface.get_available_display_refresh_rates()
instart_vr.gd
which was working fine up until beta 1.It now gives the error
Trying to assign an array of type "Array" to a variable of type "Array[float]"
.Steps to reproduce
Open one of the two openxr movement demos Open the start_vr.gd script
No need to run the project, the error is given right away.
Minimal reproduction project (MRP)
https://github.com/godotengine/godot-demo-projects/tree/master/xr/openxr_character_centric_movement