How to set/get remote control preset controller values

VS-SVDV
Wed, 06 Nov 2024 02:12:01 +0000
Programming & Scripting

I am just getting started with using the remote control HTTP API, and currently testing out different endpoints in Postman. I have 3 controllers setup in my remote control preset, as well as 6 properties exposed.

I have been able to get the value of an exposed property using /remote/preset/AA51EFC84EC46F5DD033DFAE76F407EE/property/C52AC97C46501285631C50BF3CF45E4C, using the ID of the preset and the exposed property that are listed in other endpoints. This shows that unreal can definitely find the preset with this ID.

However, when I try to use /remote/preset/AA51EFC84EC46F5DD033DFAE76F407EE/controller/9267613B4615A3211B12E8998E2E6840 to get the value of a controller rather than a property, it keeps giving me this response:

{
    "errorMessage": "Unable to resolve the preset."
}

I have double and triple checked the ID of the preset and the controller.

What am I doing wrong here? I want to be able to set the value of controllers from the API so that our software can control Unreal. I’m currently just trying to get the value so I can see what format the controller might be expecting when setting the value (since the controller endpoint doesn’t seem to be documented)

For reference, here are the responses from the API showing the preset, properties, and controllers:
/remote/presets

{
    "Presets": [
        {
            "Name": "/Game/TestScene",
            "ID": "AA51EFC84EC46F5DD033DFAE76F407EE",
            "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaScene_0.RemoteControlPreset"
        }
    ]
}

/remote/preset/AA51EFC84EC46F5DD033DFAE76F407EE

{
    "Preset": {
        "Name": "/Game/TestScene",
        "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaScene_0.RemoteControlPreset",
        "ID": "AA51EFC84EC46F5DD033DFAE76F407EE",
        "Groups": [
            {
                "Name": "All",
                "ExposedProperties": [
                    {
                        "DisplayName": "Text",
                        "ID": "C52AC97C46501285631C50BF3CF45E4C",
                        "UnderlyingProperty": {
                            "Name": "Text",
                            "DisplayName": "Text",
                            "Description": "The text to generate a 3d mesh",
                            "Type": "FText",
                            "TypePath": "None",
                            "ContainerType": "",
                            "KeyType": "",
                            "Metadata": {
                                "ToolTip": "The text to generate a 3d mesh"
                            }
                        },
                        "Metadata": {},
                        "OwnerObjects": [
                            {
                                "Name": "Text3DComponent",
                                "Class": "AvaText3DComponent",
                                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaTextActor_0.Text3DComponent"
                            }
                        ]
                    },
                    {
                        "DisplayName": "Text (1)",
                        "ID": "278757764F8BBF56B0BA8EA0534E2B96",
                        "UnderlyingProperty": {
                            "Name": "Text",
                            "DisplayName": "Text",
                            "Description": "The text to generate a 3d mesh",
                            "Type": "FText",
                            "TypePath": "None",
                            "ContainerType": "",
                            "KeyType": "",
                            "Metadata": {
                                "ToolTip": "The text to generate a 3d mesh"
                            }
                        },
                        "Metadata": {},
                        "OwnerObjects": [
                            {
                                "Name": "Text3DComponent",
                                "Class": "AvaText3DComponent",
                                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaTextActor_3.Text3DComponent"
                            }
                        ]
                    },
                    {
                        "DisplayName": "Texture",
                        "ID": "E068BA1B497BC9679AB940AEEE853A9B",
                        "UnderlyingProperty": {
                            "Name": "Value",
                            "DisplayName": "Texture",
                            "Description": "",
                            "Type": "UTexture",
                            "TypePath": "/Script/Engine.Texture",
                            "ContainerType": "",
                            "KeyType": "",
                            "Metadata": {}
                        },
                        "Metadata": {},
                        "OwnerObjects": [
                            {
                                "Name": "DMMaterialValueTexture_3",
                                "Class": "DMMaterialValueTexture",
                                "Path": "/Game/TestScene.TestScene:PersistentLevel.Rectangle.AvaShapeRectangleDynamicMesh_0.DynamicMaterialInstance_0.DynamicMaterialModel_0.DMMaterialValueTexture_3"
                            }
                        ]
                    },
                    {
                        "DisplayName": "Text (2)",
                        "ID": "E4ABEF3A4339FD6C8CB9509505B73BFE",
                        "UnderlyingProperty": {
                            "Name": "Text",
                            "DisplayName": "Text",
                            "Description": "The text to generate a 3d mesh",
                            "Type": "FText",
                            "TypePath": "None",
                            "ContainerType": "",
                            "KeyType": "",
                            "Metadata": {
                                "ToolTip": "The text to generate a 3d mesh"
                            }
                        },
                        "Metadata": {},
                        "OwnerObjects": [
                            {
                                "Name": "Text3DComponent",
                                "Class": "AvaText3DComponent",
                                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaTextActor_4.Text3DComponent"
                            }
                        ]
                    },
                    {
                        "DisplayName": "Text (3)",
                        "ID": "EEF1F3754778A67A632ACEB1577F55A1",
                        "UnderlyingProperty": {
                            "Name": "Text",
                            "DisplayName": "Text",
                            "Description": "The text to generate a 3d mesh",
                            "Type": "FText",
                            "TypePath": "None",
                            "ContainerType": "",
                            "KeyType": "",
                            "Metadata": {
                                "ToolTip": "The text to generate a 3d mesh"
                            }
                        },
                        "Metadata": {},
                        "OwnerObjects": [
                            {
                                "Name": "Text3DComponent",
                                "Class": "AvaText3DComponent",
                                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaTextActor_2.Text3DComponent"
                            }
                        ]
                    },
                    {
                        "DisplayName": "Color",
                        "ID": "AE9DA50946D93358B2EED49EA611B24C",
                        "UnderlyingProperty": {
                            "Name": "Value",
                            "DisplayName": "Color",
                            "Description": "",
                            "Type": "FLinearColor",
                            "TypePath": "None",
                            "ContainerType": "",
                            "KeyType": "",
                            "Metadata": {}
                        },
                        "Metadata": {},
                        "OwnerObjects": [
                            {
                                "Name": "DMMaterialValueFloat3RGB_1",
                                "Class": "DMMaterialValueFloat3RGB",
                                "Path": "/Game/TestScene.TestScene:PersistentLevel.Rectangle_1.AvaShapeRectangleDynamicMesh_0.DynamicMaterialInstance_0.DynamicMaterialModel_0.DMMaterialValueFloat3RGB_1"
                            }
                        ]
                    }
                ],
                "ExposedFunctions": [],
                "ExposedActors": []
            }
        ],
        "Controllers": [
            {
                "DisplayName": "B100",
                "Description": "Text - Line 1",
                "ID": "9267613B4615A3211B12E8998E2E6840",
                "Type": "FString",
                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaScene_0.RemoteControlPreset.RCControllerContainer_0.RCController_0",
                "Metadata": {}
            },
            {
                "DisplayName": "B200",
                "Description": "Text - Line 2",
                "ID": "F8670C01401CE2FC8727E69C68970C9F",
                "Type": "FString",
                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaScene_0.RemoteControlPreset.RCControllerContainer_0.RCController_1",
                "Metadata": {}
            },
            {
                "DisplayName": "A100",
                "Description": "0 = Show 1\r\n1 = Show 2",
                "ID": "383350994F354B0ECE7834B9888EDD75",
                "Type": "int32",
                "Path": "/Game/TestScene.TestScene:PersistentLevel.AvaScene_0.RemoteControlPreset.RCControllerContainer_0.RCController_2",
                "Metadata": {}
            }
        ]
    }
}

3 posts - 2 participants