0 votes

lets say show inventory scene in the canvas layer

asked Jun 14 in Engine by fisox.zero (38 points)
edited Jun 14 by fisox.zero

with a script or doing it in editor?

1 Answer

0 votes
Best answer

I do something like this (I use C#).

var inventoryScene = (PackedScene)ResourceLoader.Load("res://Inventory.tscn");
var inventory = inventoryScene.Instance();
var nodeToLoadInto = GetNode("SomeNode");
nodeToLoadInto.AddChild( inventory);

I'm not sure about the canvas part of your question though.

Here's the part in the docs

answered 6 days ago by duke_meister (592 points)
selected 5 days ago by fisox.zero

oh so you use add child() got it! not long ago i was learning about this subject.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.