Questions about Web Remote Control

I’m currently working on a project evaluating the VRay for Unreal plugin. I’ve made a basic application allowing the user to configure a car. Next I wanted to make it possible to render the user’s configuration with V-Ray. To transfer the configuration information to the editor I used the Web Remote Control API. The packaged application sends a HTTP request to the Web Remote Control Server using the VaRest Plugin. Right now information about changed materials and the camera position are send and applied to the corresponding objects in the level. For that I’m using an EditorUtilityActor, whose functions are being called by the requests. After managing to get this working I now have a few questions about the Web Remote Control API:

**1. **In the documentation for the Web Remote Control API (which is only three pages) I only found out how to access functions, parameters, etc of objects in the current level with an object path like this:


"objectPath" : "/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.CubeMesh_5"

Because the application should be able to change the level, I originally wanted to call the functions of blueprints not in the level, but there is no documentation how to do this or if it is even possible. Does anyone know more about this?

2. If calling blueprints outside out the level isn’t possible; if I would be able to succesfully change the level I could just change the level name in the object path of the request.
But I also tried just loading the level with one request calling this function:


https://forums.unrealengine.com/core/image/gif;base64

Which is called like this:


{
    "objectPath" : "/Game/Levels/Studio.Studio:PersistentLevel.EditorRenderActor_2",
    "functionName":"LoadLevel",
    "parameters": {
        "Levelname":"Studio"
    }
}

But this just crashes the editor. I assume because the actor doesn’t respond after loading the level as it was removed from memory and a new one was created, or something like that.
Is there a different way of loading the level with a HTTP request, without crashing the editor?

  1. After the materials and camera position are changed I want to start a V-Ray render. All I manually need to do that, is press the V-Ray button in the menu bar above the viewport (see image).

    Is there a way to simply “press” a button in this bar via editor scripting, so i can call it with a HTTP request?
    I will also try to contact the developers of V-Ray to find out if there is anything which can be called in blueprints or c++ to start a rendering, but so far I haven’t found anything and don’t expect there to be anything.

**4. **Is there really no more documentation about the Web Remote Control API than this page: https://docs.unrealengine.com/en-US/…rol/index.html and the Quick Start Guide and Endpoint Reference it links to?

Thanks for any help in advance!

I’ve found out how to load a level using the web remote control: Just make a put request with the following body to the remote/object/call endpoint:


{
    "objectPath" : "/Script/EditorScriptingUtilities.Default__EditorLevelLibrary",
    "functionName":"LoadLevel",
    "parameters": {
        "AssetPath":"/Game/Levels/YourLevelname"
    }
}

This calls the LoadLevel function of the EditorLevelLibrary like the function GetAllLevelActors is called in this example.

I would still appreciate any help on my third question, as I haven’t found anything about editor scripting accessing menus which are not used in the world editor or content browser.

1 Like