このページでは、リモート コントロール API によって リモート コントロール プリセット のために提供される HTTP エンドポイントと、各エンドポイントを呼び出す際に含める必要のあるメッセージ ボディの形式について詳しく解説します。
このページの各例では、ブループリントの「サードパーソン テンプレートが使用されています。これらの例に沿って進めるには、プロジェクトに リモート コントロール プリセット を追加して、これに「MyPreset」と名前を付け、以下のプロパティと関数を公開します。
-
指向性ライトの回転 (Rotation) プロパティは「Directional Light Rotation」に名前を変更。
-
Kismet System システムからの Print Text 関数の [Print to Log (ログに出力)] を有効に設定。

GET remote/presets
使用可能なすべてのプリセットのリストを取得するには、このエンドポイントを使用します。この呼び出しにより、プロジェクトに含まれるすべての リモート コントロール プリセット の情報を含む JSON ペイロードが返されます。
例
空のリクエスト ボディでリクエストを送信します。リクエストが成功すると、次のプロパティを含む「200 ステータス」とレスポンス ボディが返されます。
{
"Presets": [
{
"Name":"MyPreset",
"Path": "/Game/Presets/MyPreset.MyPreset"
}
]
}
GET remote/preset/insert_preset_name
プロジェクトに含まれる特定のプリセットの詳細を取得するには、このエンドポイントを使用します。この URL の insert_preset_name
の部分を、プロジェクトの リモート コントロール プリセット の名前に置き換えます。指定した名前のプリセットが検出された場合は、この呼び出しにより、そのプリセットの情報を含む JSON ペイロードが返されます。
指定した名前のプリセットが検出されなかった場合は、次のエラー メッセージを含む JSON ペイロードが返されます。
{
"errorMessage":"Preset insert_preset_name could not be found."
}
例
リクエスト ボディが空白の GET http://localhost:30010/remote/preset/MyPreset
リクエストを送信すると、「200 ステータス」と次のレスポンス ボディを含む、成功したリクエストが返されます。
{
"Preset": {
"Name":"MyPreset",
"Path": "/Game/Presets/MyPreset.MyPreset",
"Groups": [
{
"Name":"Lighting",
"ExposedProperties": [
{
"DisplayName":"Directional Light Rotation",
"UnderlyingProperty": {
"Name":"RelativeRotation",
"Description":"Rotation of the component relative to its parent",
"Type":"FRotator",
"ContainerType": "",
"KeyType": "",
"Metadata": {
"ToolTip":"Rotation of the component relative to its parent"
}
}
}
],
"ExposedFunctions": []
},
{
"Name":"Print",
"ExposedProperties": [],
"ExposedFunctions": [
{
"DisplayName":"Print Text (KismetSystemLibrary)",
"UnderlyingFunction": {
"Name":"PrintText",
"Description":"Prints text to the log, and optionally, to the screen\nIf Print To Log is true, it will be visible in the Output Log window.Otherwise it will be logged only as 'Verbose', so it generally won't show up.\n\n@param InText The text to log out\n@param bPrintToScreen Whether or not to print the output to the screen\n@param bPrintToLog Whether or not to print the output to the log\n@param bPrintToConsole Whether or not to print the output to the console\n@param TextColor Whether or not to print the output to the console\n@param Duration The display duration (if Print to Screen is True).Using negative number will result in loading the duration time from the config.",
"Arguments": [
{
"Name":"WorldContextObject",
"Description": "",
"Type":"UObject*",
"ContainerType": "",
"KeyType": "",
"Metadata": {}
},
{
"Name":"InText",
"Description": "",
"Type":"FText",
"ContainerType": "",
"KeyType": "",
"Metadata": {}
},
{
"Name": "bPrintToScreen",
"Description": "",
"Type": "bool",
"ContainerType": "",
"KeyType": "",
"Metadata": {}
},
{
"Name": "bPrintToLog",
"Description": "",
"Type": "bool",
"ContainerType": "",
"KeyType": "",
"Metadata": {}
},
{
"Name":"TextColor",
"Description": "",
"Type":"FLinearColor",
"ContainerType": "",
"KeyType": "",
"Metadata": {}
},
{
"Name":"Duration",
"Description": "",
"Type": "float",
"ContainerType": "",
"KeyType": "",
"Metadata": {}
}
]
}
}
]
}
]
}
}
GET remote/preset/insert_preset_name/metadata
プリセットに関連付けられているすべてのメタデータを取得するには、このエンドポイントを使用します。この URL の insert_preset_name
の部分を、プロジェクトの リモート コントロール プリセット の名前に置き換えます。この呼び出しにより、そのプリセットのメタデータ エントリを含む JSON ペイロードが返されます。
例
リクエスト ボディが空白の GET http://localhost:30010/remote/preset/MyPreset/metadata
リクエストを送信すると、「200 ステータス」と次のレスポンス ボディを含む、成功したリクエストが返されます。
{
"Metadata": {}
}
メタデータ エントリを PUT remote/preset/insert_preset_name/metadata/insert_metadata_key
で追加した後にこのエンドポイントを呼び出すと、結果にこれらのキーと値のペアが含まれるようになります。
PUT remote/preset/insert_preset_name/metadata/insert_metadata_key
プリセットのメタデータ キーと値のペアを作成または更新するには、このエンドポイントを使用します。メタデータ キーの名前は任意ですが、リクエスト ボディには JSON オブジェクトの "Value" プロパティを含める必要があります。その他のプロパティを含めると、その値は空白の文字列となります。この呼び出しでは、リクエストの状態のみが返されます。
例
次のリクエスト ボディを含む PUT http://localhost:30010/remote/preset/MyPreset/metadata/MyKey
リクエストを送信します。
{
"Value":"MyValue"
}
A successful request returns a 200 status.Verify the key-value pair was created by calling GET http://localhost:30010/remote/preset/MyPreset/metadata
:
{
"Metadata": {
"MyKey":"MyValue"
}
}
GET remote/preset/insert_preset_name/metadata/insert_metadata_key>
メタデータ キーに関連付けられている値を読み取るには、このエンドポイントを使用します。この呼び出しにより、リクエストした情報を含む JSON ペイロードが返されます。
例
リクエスト ボディが空白の GET http://localhost:30010/remote/preset/MyPreset/metadata/MyKey
リクエストを送信します。リクエストが成功すると、次のレスポンス ボディを含む「200 ステータス」が返されます。
{
"Value":"MyValue"
}
DELETE remote/preset/insert_preset_name/metadata/insert_metadata_key
プリセットに関連付けられているメタデータ キーと値のペアを削除するには、このエンドポイントを使用します。この呼び出しでは、リクエストの状態のみが返されます。
例
DELETE http://localhost:30010/remote/preset/MyPreset/metadata/MyKey
リクエストを送信すると、「200 ステータス」を含む成功したリクエストが返されます。GET http://localhost:30010/remote/preset/MyPreset/metadata
を呼び出して、このキーと値のペアが削除されたことを確認します。
{
"Metadata": {}
}
GET remote/preset/insert_preset_name/property/insert_property_name
プリセットで公開されているプロパティを読み取るには、このエンドポイントを使用します。この呼び出しにより、リクエストした情報を含む JSON ペイロードが返されます。
例
リクエスト ボディが空白の GET http://localhost:30010/remote/preset/MyPreset/property/Directional Light Rotation
リクエストを送信します。
リクエストが成功すると、次のレスポンス ボディで 200 ステータスが返されます。
{
"PropertyValues": [
{
"ObjectPath": "/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap:PersistentLevel.DirectionalLight_0.LightComponent0",
"PropertyValue": {
"Pitch": -66.3094,
"Yaw":7.72808,
"Roll": -6.48224
}
}
]
}
PUT remote/preset/insert_preset_name/property/insert_property_name
プリセットで公開されているプロパティの値を更新するには、このエンドポイントを使用します。
例
次のリクエスト ボディを含む PUT http://localhost:30010/remote/preset/MyPreset/property/Directional Rotation Light
リクエストを送信します。
{
"PropertyValue": {
"Pitch": -90,
"Yaw":0,
"Roll":0
},
"GenerateTransaction": true
}
リクエストが成功すると、「200 ステータス」が返されます。プリセットのプロパティをチェックして、変更を確認します。

PUT remote/preset/insert_preset_name/function/insert_function_name
プリセットで公開されている関数を呼び出すには、このエンドポイントを使用します。この呼び出しにより、関数の戻り値を含む JSON ペイロードが返されます。
例
次のリクエスト ボディを含む PUT http://localhost:30010/remote/preset/MyPreset/function/Print Text (KismetSystemLibrary)
リクエストを送信します。
{
"Parameters": {
"InText":"Hello, World"
},
"GenerateTransaction": true
}
リクエストが成功すると、次のレスポンス ボディを含む「200 ステータス」が返され、「Hello, World」がアウトプット ログに出力されます。
{
"ReturnedValues": [
{}
]
}