Skip to content

Script Examples

Send Command

Download ezUI File

In this example, will create a function that sends a command to the engines in the active profile, via Erizos Studio. This is a preferred method to sending a command directly to the engine, as the action will be handled and logged by Erizos Studio.

In this example, we can simply send a command directly to the engine by calling the UI Builder Studio API.

1
  Api.profile.program.sendCommand('UE', cmd)

Vizrt Example

1
Api.profile.program.sendCommand('VIZRT',  { 'command': 'MAIN VERSION' } );

Unreal Engine Examples

This command will set the value of the control component with the ID "01"

1
2
3
4
5
6
7
Api.profile.program.sendCommand('UE',  { 
  'action': 'SET', 
  'cache': true,
  'payload': {
    '01': 'My Value'
  }
} );

This command launch Unreal with the Project "ExampleProject" (Saved in the Unreal Projects Folder), and load the "Main" level

1
2
3
4
5
Api.profile.program.sendCommand('UE',  {
  'action': 'LAUNCH',
  'project': '/ExampleProject',
  'level': '/ExampleProject/Maps/Main.Main'
});