You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This snippet of code will crash with the error Trying to assign an array of type "Array" to a variable of type "Array[String]". because var_to_bytes doesn't seem to store the type of the typed array _e_export.
Steps to reproduce
Create a new project
Create a new empty scene and place the code snippet above inside a node
Not sure whether this qualifies as a bug or not - partly because the implementation of typed arrays isn't fully complete yet and no one is currently working on it :)
But as a work-around, the following works:
extendsNode@exportvar_e_export: Array[String]
func_ready():
varbytes_export=var_to_bytes(_e_export)
varvar_export=bytes_to_var(bytes_export)
_e_export.assign(var_export) # No Errorprint(_e_export)
Godot version
v4.0.2.stable.official [7a0977c]
System information
Windows 11
Issue description
This snippet of code will crash with the error
Trying to assign an array of type "Array" to a variable of type "Array[String]".
becausevar_to_bytes
doesn't seem to store the type of the typed array_e_export
.Steps to reproduce
Minimal reproduction project
Typed_Array_Var_To_Bytes.zip
The text was updated successfully, but these errors were encountered: