Skip to content

Commit 0447cfc

Browse files
authored
Merge pull request #9640 from dsnopek/xr-start-real-pause
Truly pause game in XR start script tutorial
2 parents 7503ecb + 7e0bbca commit 0447cfc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tutorials/xr/a_better_xr_start_script.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ If you haven't, you can connect a method to the signal that performs additional
331331
xr_is_focussed = false
332332

333333
# pause our game
334-
process_mode = Node.PROCESS_MODE_DISABLED
334+
get_tree().paused = true
335335

336336
emit_signal("focus_lost")
337337

@@ -355,7 +355,7 @@ If you haven't, you can connect a method to the signal that performs additional
355355
_xrIsFocused = false;
356356

357357
// Pause our game
358-
ProcessMode = ProcessModeEnum.Disabled;
358+
GetTree().Paused = true;
359359

360360
EmitSignal(SignalName.FocusLost);
361361
}
@@ -395,7 +395,7 @@ While handling our signal we will update the focusses state, unpause our node an
395395
xr_is_focussed = true
396396

397397
# unpause our game
398-
process_mode = Node.PROCESS_MODE_INHERIT
398+
get_tree().paused = false
399399

400400
emit_signal("focus_gained")
401401

@@ -414,7 +414,7 @@ While handling our signal we will update the focusses state, unpause our node an
414414
_xrIsFocused = true;
415415

416416
// Un-pause our game
417-
ProcessMode = ProcessModeEnum.Inherit;
417+
GetTree().Paused = false;
418418

419419
EmitSignal(SignalName.FocusGained);
420420
}

0 commit comments

Comments
 (0)