Files
o3de/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/GameModeCommands_test_case.py
T
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
2021-06-30 19:51:55 -07:00

34 lines
774 B
Python
Executable File

"""
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# Tests the Python Game Mode API from PythonEditorFuncs.cpp while the Editor is running
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.legacy.general as general
general.idle_enable(True)
general.idle_wait(0.125)
general.enter_game_mode()
general.idle_wait(1.0)
if(general.is_in_game_mode()):
print("Game Mode is On")
general.idle_wait(0.125)
general.exit_game_mode()
general.idle_wait(1.0)
if not (general.is_in_game_mode()):
print("Game Mode is Off")
editor.EditorToolsApplicationRequestBus(bus.Broadcast, 'ExitNoPrompt')