Unreal Engine SDK
Last updated
Last updated
LIFT Inspector is a plugin designed as a tool to send client (player) screenshots to LIFT. Inspector works automatically at all levels as a Subsystem of Game Instance, i.e. it can be controlled at any moment of a game session, at any level of the game / application.
Download/clone github.com/PlayFi-Labs/unreal-plugin and add this to the Plugins folder in your Unreal project.
After installing the plugin in the project, make sure the plugin is enabled in the "Plugins" tab.
You can open the settings in 2 ways. The first one is made for convenience and quick opening of settings, there is a button on the toolbar designed for convenience.
Once clicked, the window of the object that is responsible for Inspector settings will open.
The second way is to open the settings object manually, the object is located at the path: /All/Plugins/InspectorLIFT/Settings/ (the path can be inserted into the ContentBrowser).
Notice: If you don't see the settings, go to the Class Defaults tab.
Enable Inspector - Whether Inspector will be enabled at the start of a game session.
Enable Debug Log - Whether logs will be output to the console responsible for Inspector status / errors.
Save Image to Disk - Whether each screenshot taken will be saved to the client's computer disk.
Screenshot Timer Rate - The frequency at which Inspector will take screenshots of the client screen.
Duplicate Threshold Percentage - The percentage of screenshot similarity that will count as a duplicate. The screenshot that was taken just now and the last screenshot successfully sent to the server are compared. For example, if the percentage of similarity of screenshots is 98.5%, then these screenshots will be considered as duplicates and the newly made screenshot will not be sent to the server.
Max Allowed Threshold for Duplicated Pixel - Maximum allowable threshold for naming a pixel in a color in which the pixel will be considered a duplicate. During image rendering, pixels have properties to change their color slightly, so we need to take this fact into account and allow pixels to change their color slightly while checking for duplicate images. For example, there are set colors to check for duplicate images: RGB (100, 100, 100) and RGB (108, 100, 100). The red color is set to 8 units, but if the threshold is equal to the default value of 10, these two colors will be considered duplicates.
Save Image to Disk path - The path on the client disk where all screenshots will be saved. The path is built relative to the folder with the application.
Endpoint - Endpoint where the request to send screenshots will be made.
Boundary - The Boundary to be used when constructing a multipart/form-data request.
X API Key - Value of X-API-KEY header when sending a request to the server.
Model ID - Value of model_id parameter when sending a request to the server.
Config Name - Value of config_name parameter when sending a request to the server.
Payload - Value of payload parameter when sending a request to the server.
To communicate with the Inspector Subsystem, you need to get its instance using a method Get IPF_InspectorSubsystem:
To enable/disable the inspector during runtime, the Enable Inspector method with the corresponding true / false parameter is used:
To get / set User ID, use the Get User ID and Set User ID methods:
For a manual screenshot, use LIFT Take Screenshot async task which will return you Colors, Width, Height array on successful screenshot of client screen. Response Message serves as a report of possible errors:
To manually send an image to the server, use the LIFT Send Image To Server async task which will return the code and content of the response from the server:
Notice: Fields in settings, such as Endpoint, are considered "standard" meaning that when passing in LIFT Send Image To Server async task empty fields, the "standard" settings fields will be used.