UE Web Remote Control call python script
UE remotely calls Python (UE Python API) script
Web Remote Control
Remotely operate Unreal Engine projects on a web client.
The Unreal Editor provides a powerful set of tools for manipulating nearly every aspect of your project's content. But in some cases, successfully using the engine in a large content editing process requires modifying the project from outside the editor UI.
The Web Remote Control system achieves this goal by running a web server in Unreal Engine and serving WebSocket messages and HTTP requests issued by remote web applications through a REST-like API.
Enable plugin
Enabled Remote Control API
Start service
WebControl.StartServer
WebControl.StopServer
WebControl.EnableServerOnStartup
WebPut call
Python
RootPath/:Project/Content/Python/remote.py
import unreal
@unreal.uclass()
class RemoteClass(unreal.BlueprintFunctionLibrary):
@unreal.ufunction(static=True)
def remote():
print("Hello from remote!")
function with parameters
Install Python
Call
http://localhost:30010/remote/object/call
{
"objectPath":"/Engine/PythonTypes.Default__RemoteClass",
"functionName":"remote"
}
Postman test calls API
Related plug-ins
reference
-
https://docs.unrealengine.com/5.0/zh-CN/remote-control-quick-start-for-unreal-engine/
-
https://forums.unrealengine.com/t/executing-python-with-web-remote-control/156550
-
https://docs.unrealengine.com/5.0/zh-CN/remote-control-api-http-reference-for-unreal-engine/
-
https://blog.csdn.net/mrbaolong/article/details/131986753?spm=1001.2014.3001.5501