fix: GameRoot now initializes rng in _enter_tree

main
Sara 2024-10-05 22:24:42 +02:00
parent 8dc8144915
commit 528db9415c
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ void GameRoot3D::_enter_tree() {
// TODO: Replace this with detecting input devices // TODO: Replace this with detecting input devices
this->player_input_connected(); this->player_input_connected();
this->grab_singleton(); this->grab_singleton();
this->rng = gd::Ref<gd::RandomNumberGenerator>(memnew(gd::RandomNumberGenerator));
} }
void GameRoot3D::_ready() { void GameRoot3D::_ready() {