How to reflect runtime changes of an exposed variable to the Remote Control Web Interface

Hello,

I would like to use the Remote Control Web Interface to control and monitor variables of my project in a packaged build.
Controlling the variables from the web interface works fine, when I change the variable in the interface, it updates in the application. However it does not work in the other direction : if a variable is changed internally by the application, the change is not reflected in the web interface.

Would it be possible to modify the Remote Control plugin in order to have changes of variables made in the application reflected in the web interface ?

If so were would this have to be implemented ? Is it a limitation of the Remote Control API or a limitation of the Remote Control Web Interface ?

Hi,
have you managed to find a solution for this? I’m trying to save and load variables through web remote and encountered this issue as well.

Hello,

I think a fix is coming for it in the next version. You should try with with the 5.3 preview see if it is fixed.

There are property watchers to fix this issue but they were not working in my case. You can use the RemoteControl.EnablePropertyWatchInEditor console variable to enable them in the editor to see if it works. In my case it didn’t.

1 Like

Hi,

I’m testing with 5.3. I tried setting RemoteControl.EnablePropertyWatchInEditor to 1, but when I load my SaveGame the web remote parameters are not reflecting the changes. The same happens in the packaged application unfortunately.

Yes, I tried it also and it does not seem to be working in 5.3 either.

Have you tried using those command line parameters when launching the application ?

-game -RCWebControlEnable -RCWebInterfaceEnable -dpcvar=“RemoteControl.EnablePropertyWatchInEditor=1”

I tried these command line parameters, but it works similarly to the editor behaviour. When the SaveGame is loaded the web remote does not update.

I managed to make it work in editor. It seems when you set RemoteControl.EnablePropertyWatchInEditor in the editor it’s already too late. I tried to put it in DefaultEngine.ini, but I could not figure out what the section name should be. I tried [/Script/RemoteControl.RemoteControlPreset], but it did not work.

As a workaround I modified the plugin source and set the default value of the variable to 1. I copied the RemoteControl and the RemoteControlWebInterface plugins to the project. It’s not ideal, but a step towards the right direction. Probably it would work by setting the variable in the ini file properly too.

Unfortunately it does not work with a packaged build.

Nice, it’s not the best solution but at least it’s something.

There is also a typo in the command line I gave you earlier, it should be

-game -RCWebControlEnable -RCWebInterfaceEnable -dpcvars=“RemoteControl.EnablePropertyWatchInEditor=1”

Could you try and see if it works with the packaged build ?

Unfortunately it won’t work with the packaged build, even if I force it inside the plugin, which should behave the same way as with the cvar.

According to the source code it should work in the same way in the packaged build without setting the cvar if I’m not mistaken:
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/VirtualProduction/RemoteControl/Source/RemoteControl/Private/RemoteControlPreset.cpp#L1237

The modified properties are sent to the web remote as far as I can tell here:
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/VirtualProduction/RemoteControl/Source/RemoteControl/Private/RemoteControlPreset.cpp#L2384

But this broadcast message only works in editor, it has no effect in the packaged build.

Good day!
Are there any improvements to resolve this issue?

I’m afraid not. I have reported it as an issue, but I didn’t get any reply, so it was probably rejected.

What worked for me to launch a project from Switchboard with nDisplay and WebControl without using a Multi User session was the following:

  1. Create a web control preset.
  2. Drag the WebControlPreset asset to the scene you’re going to launch with Switchboard.
  3. Optional: Set that scene as the default scene for the project. In ProjectSettings/Maps&Modes/DefaultMaps/GameDefaultMap
  4. Save the project, launch the Switchboard listener and Switchboard. Close the editor.
  5. In Switchboard add your nDisplay Device.
  6. In Switchboard click the settings (cog wheel). In the nDisplay tab go to your ndisplay node and add the following Extra Cmd Line Args

    -RCWebControlEnable -RCWebInterfaceEnable

  7. Launch the project using Switchboard. Go to the Web UI link

Optional: You can create a simple level with all your Virtual Production stuff (ndisplay config asset, Cinecamera with tracker setup, Lightcards, RemoteControlPreset asset, etc) and then use LevelStreaming to load multiple level at once. This way you don’t have to replicate the Virtual Production stuff everywhere. Make sure to set the level Streaming Method to “Always Loaded” otherwise it won’t appear when you load the level.