-
Hello In go it is simple to create node and add it as child mainmenu := gd.Create(a.Temporary, new(mainmenu.MainMenu))
mainmenu.Super().AsNode().SetName(a.Temporary.String("MainMenu"))
gd.AddChild(a.Temporary, a.Super().AsNode(), mainmenu.Super().AsNode()) But can I create scene from
The reason is, for example, I creating main menu and dont want to position all buttons in code while guessing exact correct numbers |
Beta Was this translation helpful? Give feedback.
Answered by
Splizard
Jul 22, 2024
Replies: 1 comment 1 reply
-
For sure! var scene = gd.Load[gd.PackedScene](a.Temporary, "res://scenes/main.tscn")
main_scene := scene.Instantiate() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Splizard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For sure!