- Edited
When trying to assign variables in a class, they're returning as null or blank later on, despite being confirmed to be assigned. Here's an example, where kx
is a string with value 0001:
var key: String
...
func my_function(kx: String):
print(kx) # prints "0001"
key = kx
print(key) # prints "0001"
When querying this value in _physics_process()
, it returns as a blank string. I've observed similar results when assigning other types of variables.
I've probably missed something stupid, but nonetheless does anyone know the issue?