DeveloperDeveloper
  • Standard Solutions
  • Cam Solutions
  • Native SDKs
  • App Gallery
  • Game Engine Plugins
Forum
Projects Library
Dev Discord
  • Standard Solutions
  • Cam Solutions
  • Native SDKs
  • App Gallery
  • Game Engine Plugins
Forum
Projects Library
Dev Discord
  • Game Engine Plugin
  • Unity Universal Plugin For Remote
  • Unity Plugin - Android SDK
  • Unity Plugin - iOS SDK
  • Unity Plugin - Windows
  • Unity Plugin - Dongle
  • Unity Plugin - Mac
  • Unreal Plugin For Remote
  • C++ DLL - Windows
  • Ren'Py Plugin For Remote

Unreal Plugin For Remote

Introduction

This Unreal plugin allows Windows devices to connect Lovense toys and send control commands.

Note: Android and iOS Remote App requires "Game Mode" to be enabled, PC Remote App requires "Allow Control" to be enabled.

Compatibility

Unreal version: >= UE4.27

Import the plugin

  1. Download the plugin package from here. The latest version of the current plugin is V1.7 click to view version records

    LovenseIntegration_4.27

    LovenseIntegration_5.0

    LovenseIntegration_5.1

    LovenseIntegration_5.2

    LovenseIntegration_5.3

    LovenseIntegration_5.4

    LovenseIntegration_5.5

  2. Unzip the file to the /Plugins/ folder.

  3. The LovenseIntegration/Config/LovenseToySupportConfig.csv file has the setup information for toy support. The latest version is 1.5, and it's recommended to download this version.

Dowload: LovenseToySupportConfig.csv, After downloading, open the LovenseIntegration/Content/LovenseToySupport.uasset file in the UE editor and reimport the csv file.

Guide

1. Start Search

image

2. GetToys

image

3. Send Commands

3.1 Send Commands

  • Description:

    Send function commands to the toys.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    commandsTArray<UELovenseCommands>yesSee UELovenseCommands
    toyULovenseToyyesthe toy you want control
    timefloatyesTotal running time in second, 0 represents no limit
    loopRunningSecfloatyestime running for each command loop in second
    loopPauseSecfloatyestime gap for each command loop in second
    callbackFOnLovenseResponseDynamicyesthe parameters is ULovenseToy* toy, int32 responseValue

3.2 Send Preset

  • Description:

    Now we provide four preset patterns in the Lovense Remote app: pulse, wave, fireworks, earthquake

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    toyULovenseToy*yesthe toy you want to control
    nameFStringyesThe preset name to send, we provide four preset patterns in the Lovense Remote app: pulse, wave, fireworks, earthquake
    timeSecfloatyesThe total runtime in second, "0" = indefinite time length. Otherwise, the value should be greater than or equal to 1.

3.3 Send Pattern

  • Description:

    Send a series of functions to the toys.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    toyULovenseToy*yesthe toy you want control
    bVibrateFStringyesThe preset name to send, we provide four preset patterns in the Lovense Remote app: pulse, wave, fireworks, earthquake
    bRotateboolyesenable of rotate action
    bPumpboolyesenable of pump action
    bThrustboolyesenable of thrusting action
    bSuckboolyesenable of suck action
    bFingerboolyesenable of fingering action
    intervalintyesThe level interval in milliseconds ,Should be greater than 100
    timeSecfloatyesThe total runtime in second, "0" = indefinite time length. Otherwise, the value should be greater than or equal to 1.

3.4 Send stop command

  • Description:

    Send a stop command to the toy.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    toyULovenseToy*yesthe toy you want control

3.5 Send position command

  • Description:

    Controls the stroker to move to a specified position(0~100). image

  • Parameter:

    NameTypeDefaultRequiredDescription
    positionint32yesThe position of the stroker
    toyULovenseToy*yesThe toy you want control

3.6 SetUpPatternV2

  • Description:

    Send a series of positions to Solace Pro. image

  • Parameters:

    NameTypeDescription
    positionsTArray<class UEPositionPatternValue*>The series value of PatternV2
    toyULovenseToy*

3.7 StartPatternV2

  • Description:

    Play the predefined pattern. image

  • Parameters:

    NameTypeDescription
    toyULovenseToy*
    startTimeintThe start time of playback. The value range is 0~7200000 (in ms). If you don’t include this, it will start playing from 0.
    offsetTimeintThe client-server offset time. The value range is 0~15000 (in ms). If you don’t include this, it will be set to 0.

3.8 StopPatternV2

  • Description:

    Stop playing the predefined pattern. image

  • Parameters:

    NameTypeDescription
    toyULovenseToy*

3.9 GetPatternV2SyncTime

  • Description:

    Get the offset time from the server. image

  • Parameters:

    NameTypeDescription
    toyULovenseToy*

4. Events API

4.1 Start Events API

  • Description:

    Start Events API.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip
    portintyesthe Events API's port
    resultCodeCallbackFOnEventCodeyesthe result code of starting Events API, callback parameters is int resultCode,resultCode=-1: socket connection error,resultCode=0: socket closed,resultCode=200: socket connection successed.
    toysCallbackFOnGetLovenseEventToysyesIf the Events API is successfully launched, it will respond with a list of toys that support the Events API in the Lovense Remote App, and the callback parameters is const TArray\<[UELovenseEventsToy]\> toys

4.2 Set connect event callback

  • Description:

    Set callback for toy's connect status changed.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip
    connectCallbackFOnLovenseConnectStatusEventyescallback for toy's connect status changed, and the callback parameters is FString id, bool isConnected

4.3 Set battery event callback

  • Description:

    Set callback for toy's battery changed.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip
    batteryCallbackFOnLovenseConnectStatusEventyescallback for toy's connect status changed,and the callback parameters is FString id, int32 battery

4.4 Set functions value event callback

  • Description:

    Set callback for toy's functions value changed.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip
    functionsValueCallbackFOnFunctionsEventyescallback for toy's function('See ELovenseEventType') value changed,and the callback parameters is (FString id, ELovenseEventType type,int32 value,int32 index)

4.5 Set every shake event callback

  • Description:

    Set callback for each shake of the toys.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip
    everyShakeCallbackFOnEveryShakeEventyescallback for each shake of the toys, and the callback parameters is FString id

4.6 Set button event callback

  • Description:

    Set callback for the button gesture of the toys.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip
    buttonCallbackFOnButtonEventyescallback for the button gesture of the toys,and the callback parameters is FString id, [ELovenseButtonEventType] type, int32 index

4.7 Stop Events API

  • Description:

    Stop the Events API.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    ipFStringyesthe Events API's ip

5. Get Supported Commands

5.1 Toy is support this command

  • Description:

    Determine whether specific types of toys support specific toys.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    toyTypeFStringyesthe toy type
    commandType[ELovenseCommandType]yesthe command type
  • Return: bool

5.2 Get support commands by type

  • Description:

    Get all supported command types based on toy type.

    image

  • Parameter:

    NameTypeDefaultRequiredDescription
    toyTypeFStringyesthe toy type
    commandType[ELovenseCommandType]yesthe command type
  • Return: TArray<[ELovenseCommandType]>

Class

ULovenseToy

Method

GetFullToyName
  • Description:

    Get the toy's name

  • Parameters: None

  • Return: FString

GetAssociatedAdapterPlatformName
  • Description:

    Get the Platform Name

  • Parameters: None

  • Return: FString

IsConnected

  • Description:

    Whether this toy's connection to the Lovense App is active.

  • Parameters:None

  • Return: bool

GetBatteryStatus

  • Description:

    Current battery status of the toy. Value is percentage charged, range is 0-100%.

  • Parameters:None

  • Return: int32

IsValidToy

  • Description:

    Checks whether this is a valid UObject and has all required information for normal functionality.

  • Parameters:None

  • Return: bool

ELovenseCommandType

  • Description:

    The enum of the toy function type.

  • Enum:

    typeRange
    VIBRATE0-20
    VIBRATE10-20
    VIBRATE20-20
    VIBRATE30-20
    ROTATE0-20
    PUMP0-3
    THRUST0-20
    SUCTION0-20
    FINGERING0-20
    DEPTH0-3
    OSCILLATE0-20

The DEPTH command is a setting command that requires the THRUSTRING command to take effect.

UELovenseCommands

  • Description:

    Send the class containing the types and values of commands.

Property

nametypeDescription
typeUELovenseCommandsthe type of command
valueintthe value of command

Method

SetType
  • Description:

    Set the type of commands.

SetValue
  • Description:

    Set the value of commands.

UELovenseEventsToy

Property

nametypeDescription
idFStringthe id of the toy
nameFStringthe name of the toy
typeFStringthe id of the toy
hVersionFStringthe hardware version of the toy
fVersionintthe Firmware version of the toy
nickNameFStringthe nick name of the toy
batteryintthe battery level of the toy
connectedboolthe connect status of the toy

ELovenseEventType

  • Description:

    The enum of the toy function type.

  • Enum:

    type
    VIBRATE
    ROTATE
    INFLATION
    THRUST
    SUCTION
    FINGERING
    SHAKE
    DEPTH
    POSITION

ELovenseButtonEventType

  • Description:

    The enum of the button gesture type.

  • Enum:

    type
    BUTTON_DOWN
    BUTTON_UP
    BUTTON_PRESSED

UELovenseSolaceProCommands

  • Description:

    Extends from UELovenseCommands, specially designed for use with Solace Pro.

Property

nametypeDescription
NameTypeDescription
---------------------------------------
strokeLowintThe stroke Value at the low end
strokeHighintThe stroke Value at the high end, strokeHigh - strokeLow must be greater than 20

Method

GetStrokeLow
  • Description:

    Get the value of strokeLow.

GetStrokeHigh
  • Description:

    Get the value of strokeHigh.

SetStrokeLow
  • Description:

    Set the value of strokeLow.

SetStrokeHigh
  • Description:

    Set the value of strokeHigh.

UEPositionPatternValue

  • Description:

    The position command.

  • Properties:

    NameTypeDescription
    timeintthe time in milliseconds
    positionintThe position of the stroker(0-100)

Method

GetTime
  • Description:

    Get the value of time.

GetPosition
  • Description:

    Get the value of position.

SetTime
  • Description:

    Set the value of time.

SetPosition
  • Description:

    Set the value of position.

Version Records

[Version1.7] - 2025-01-21

  • 1.Add Oscillate command for Gush2.

  • 2.Update the configuration file to version1.5.

[Version1.6] - 2024-12-4

    1. Fix the Android compilation issues.
    1. Fix the issue where the supported instructions couldn't be checked after compilation.

[Version1.5] - 2024-11-22

    1. Add compatibility for UE5.5

[Version1.4] - 2024-11-1

    1. The process will be optimized to ensure compatibility with the SSL protocol,The default protocol to be utilized is HTTPS.
    1. When controlling toys via Lovense Remote using the IP port, please ensure to set li.Requests.UseDirectIP true in the command line.
    1. Add EventAPI for Solace Pro.

[Version1.3] - 2024-08-23

    1. Support Solace Pro, Update
    1. Update the configuration file to version1.4.

[Version1.23] - 2024-05-15

    1. Fix the thrust instruction.
    1. Compatible with UE5.4.

[Version1.22] - 2024-01-16

    1. Add capability with Mac OS X.

[Version1.21] - 2023-12-13

    1. Add pre-built content.

[Version1.2] - 2023-11-15

    1. Add Vibrate1,Vibrate2,Vibrate3,Depth commands
    1. Add a function to obtain toy supported commands.and add an updatable configuration file
    1. Update the configuration file to version1.3.

[Version1.1] - 2023-10-16

    1. Add Events API.

[Version1.0] - 2023-09-21

    1. Send Commands
    1. Send Pattern Command
    1. Send Preset Command
    1. Send Stop Command
Last Updated:
Explore our Forum or Support to get more inspiration or solve your problems.
Discord Channel
It is an online real-time channel where you can communicate directly with our official administrators or many excellent developers.
Forum
It is a place for Lovense developers to communicate, where you can find solutions to problems or get inspired for your projects.
Support
Find documents and tutorials that may be helpful to you.