I wanted to use lua instead of gdscript for this project, and before I was able to do
@onready var tiles_holder: Node3D = $tiles_holder
but since "@ onready" can not be used in lua, the best I was able to do was use get_node inside of _ready
local lua_testing = {
extends = Node2D,
}
local first_child
function lua_testing:_ready()
first_child = self:get_node("first")
print(first_child)
end
return lua_testing
while this works, it is annoying to not be able to set the variable value at the top where I first declare first_child. Is there something I'm missing?
I wanted to use lua instead of gdscript for this project, and before I was able to do
but since "@ onready" can not be used in lua, the best I was able to do was use
get_nodeinside of_readywhile this works, it is annoying to not be able to set the variable value at the top where I first declare first_child. Is there something I'm missing?