MCPcopy Create free account
hub / github.com/Schr3da/gdext-rust-tutorials / init

Method init

signals/rust/src/entry_node.rs:14–23  ·  view source on GitHub ↗
(base: Base<Node2D>)

Source from the content-addressed store, hash-verified

12#[godot_api]
13impl INode2D for EntryNode {
14 fn init(base: Base<Node2D>) -> Self {
15 let main_menu_scene: Gd<PackedScene> = load("res://main_menu.tscn");
16 let game_scene: Gd<PackedScene> = load("res://game_scene.tscn");
17
18 Self {
19 base,
20 main_menu_scene,
21 game_scene,
22 }
23 }
24
25 fn ready(&mut self) {
26 self.main_menu();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected