Running Schola

Schola uses subclasses of UnrealConnection to interact with Unreal Engine. It supports both creating a standalone instance of Unreal Engine running as a child process of your python script, or connecting to a running Unreal Engine process.

Launch An Unreal Environment From Python

Schola supports running environments entirely from python using a StandaloneUnrealConnection.

Copied!

from schola.core.unreal_connection import StandaloneConnection

url="localhost" # Connect to the engine over localhost
ue_path="Path to your Game Binary"
port=None # Leave blank to use an arbitrary open port
headless_mode = True # Should we skip rendering the Unreal Engine game?
display_logs = False # Should we open a terminal to show Unreal Engine logs?
_map=None # Run the default map for the selected executable, set to "/game/<path to map>" to use a different map.
set_fps=60 # Set a fixed framerate for the game.
disable_script=True # Ignore the RunScriptOnLaunch setting for the UnrealEngineGame.

unreal_connection = StandaloneConnection(url=url,
                                        port=port,
                                        headless_mode=headless_mode,
                                        display_logs=display_logs,
                                        map=_map,
                                        set_fps=set_fps)

Initialize the Environment

Copied!

from schola.gym.env import VecEnv
from schola.core.unreal_connection import StandaloneConnection

unreal_connection = StandaloneConnection("localhost","Path To Game Binaries", headless_mode=True)
env = VecEnv(unreal_connection)
... # Your Code Here

Connect To a Running Unreal Environment

Schola supports connecting to an already running Editor or Game, for debugging and Unreal Engine driven workflows using a UnrealEditorConnection

Copied!

from schola.core.unreal_connection import UnrealEditorConnection

url="localhost" # Connect to the engine over localhost
port=8002 # Must match the port selected in your Unreal Engine Plugin Settings for Schola

unreal_connection = UnrealEditorConnection(url, port)

Initialize the Environment

Copied!

from schola.gym.env import VecEnv
from schola.core.unreal_connection import UnrealEditorConnection

unreal_connection = UnrealEditorConnection("localhost",8002)
env = VecEnv(unreal_connection)
... # Your Code Here

Related pages

  • Visit the Schola product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!