vovauser.blogg.se

Godot change scene
Godot change scene












godot change scene

Of course I want to do this for multiple nodes at once, selecting nodes that I want to change to new instances of some scene If this enhancement will not be used often, can it be worked around with a few lines of script? So if I select a node with position (100, 100), press RMB, select Change Node/ Change Scene, and select the scene my_node.tscn, then the selected node will be removed and an instance of my_node.tscn will be created with position (100,100). It should open a dialog to select new scene, then it creates its instance, removes the selected node (remembering it's parameters - node name, transform etc) and adds new node instance, and finally sets parameters to the node.

godot change scene

Similarly to Change Type, there could be a button in SceneTreeEditor right-click context menu - Change Node or Change Scene. Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams A node path is the path it takes to get from one node to another by. There is no button like Change Scene so I need to do this manually or use plugins / editor scripts which is not handy Describe the feature / enhancement and how it helps to overcome the problem or limitationĪdding a way to change one node to a scene instance keeping parameters like transform, name and others, would solve the problem. The scene tree is made of nodes, which are connected together in parent-child relationships.

Godot change scene code#

For your understanding: While the dialog is playing the game is paused, after the dialog ends the game unpauses with this code: enter code here func input (event): if getnodeornull ('DialogNode') null: if event.isactionpressed ('uiaccept') and active: get. Now I decided to change the scene to another one, keeping parameters like node transform, node name etc. At the moment I am stuggling with unpausing the game after the scene changed. I have several (dozens) instances of a scene. Games Describe the problem or limitation you are having in your project














Godot change scene