Jupyter Notebook has many useful tools to visualize data gathered from Unreal Engine games
This repository has code to start gathering and visualizing data from UE games via Session Fronted and Jupyter Notebook
run get_dependencies.bat to setup venv with dependencies based on python that packaged with unreal engine installation
Profiling_project is a container Project for ProfilingBPLibrary cpp plugin that exposes https://docs.unrealengine.com/5.1/en-US/API/Runtime/SessionServices/ISessionInstanceInfo/ExecuteCommand/ to Blueprints/Python
-
run profiling_project/profiling_project.uproject
-
Enable Remote Execution in Unreal
Project Settings -> Plugins -> Python -> Python Remote Execution -> Enable Remote Execution = True
Minimal code for unreal engine connection and command sending:
from remote_execution import RemoteExecution
remote_exec = RemoteExecution()
remote_exec.start()
for node in remote_exec.remote_nodes:
remote_exec.open_command_connection(node.get("node_id"))
remote_exec.run_command(f"unreal.ProfilingBPLibrary.send_command('stat unitgraph')")
example in test_example.ipynb
Add argument -Messaging when you run builds
example command to run on windows - profiling_project\Script\run_on_external_machine.bat
Machines on local network should be added in
Project Settings -> Plugins -> UDP Messaging -> Static Endpoints
or Engine.ini
[/Script/UdpMessaging.UdpMessagingSettings]
StaticEndpoints=192.168.**.***:6666
Use -execcmds="session AUTH username_of_controlling_pc" to unlock machines in local network for commands
Designed to be used with Jupyter Notebook to automate gathering and visualization of Unreal Engine profiling commands like profilegpu, StartFpsChart and StopFpsChart
usage example in notebook test_example.ipynb