리모트 컨트롤 프리셋 HTTP 레퍼런스

리모트 컨트롤 프리셋에 표시된 프로퍼티 및 함수 이용에 필요한 리모트 컨트롤 API가 제공하는 HTTP 엔드포인트를 자세히 다룹니다.

Choose your operating system:

Windows

macOS

Linux

이 페이지에서는 리모트 컨트롤 프리셋 에 필요한 리모트 컨트롤 API 가 제공하는 HTTP 엔드포인트를 설명하고, 엔드포인트를 호출할 때 포함해야 하는 메시지 본문의 형식을 자세히 다룹니다.

이 페이지의 예시에서는 블루프린트 3인칭(Blueprint Third-Person) 템플릿을 사용합니다. 예시를 따라 리모트 컨트롤 프리셋(Remote Control Preset) 을 프로젝트에 추가하고 이름을 MyPreset으로 지은 다음, 프로퍼티 및 함수에 노출하세요.

  • 디렉셔널 라이트의 회전 프로퍼티 이름을 **Directional Light Rotation**으로 변경하세요.

  • Kismet System Library의 프린트 텍스트 함수에서 프린트 투 로그(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"
}

요청 성공 시 200 상태를 반환합니다. `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/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.LightSource_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 상태를 반환합니다. 프리셋의 프로퍼티를 살펴보며 변경사항을 확인하세요.

image alt text

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": [
        {}
    ]
}
언리얼 엔진 문서의 미래를 함께 만들어주세요! 더 나은 서비스를 제공할 수 있도록 문서 사용에 대한 피드백을 주세요.
설문조사에 참여해 주세요
건너뛰기