|
Pico Unity XR SDK
|
Static Public Member Functions | |
| static void | InitSystemService (string objectName) |
| Initializes the system service for a specified game object. Note: Must be called before calling other system related functions. More... | |
| static void | BindSystemService () |
| Binds the system service. Note: Must be called before calling other system related functions. More... | |
| static void | UnBindSystemService () |
| Unbinds the system service. More... | |
| static bool | StartBatteryReceiver (string objName) |
| Turns on the battery service. More... | |
| static bool | StopBatteryReceiver () |
| Turns off the battery service. More... | |
| static bool | SetCommonBrightness (int brightness) |
| Sets the brightness for the current HMD. More... | |
| static int | GetCommonBrightness () |
| Gets the brightness of the current HMD. More... | |
| static int[] | GetScreenBrightnessLevel () |
| Gets the brightness level of the current screen. More... | |
| static void | SetScreenBrightnessLevel (int brightness, int level) |
| Sets a brightness level for the current screen. More... | |
| static bool | InitAudioDevice () |
| Initializes the audio device. More... | |
| static bool | StartAudioReceiver (string objName) |
| Turns on the volume service for a specified game pbject. More... | |
| static bool | StopAudioReceiver () |
| Turns off the volume service. More... | |
| static int | GetMaxVolumeNumber () |
| Gets the maximum volume. Note: Call InitAudioDevice to initialize the audio device before calling this function. More... | |
| static int | GetCurrentVolumeNumber () |
| Gets the current volume. Note: Call InitAudioDevice to initialize the audio device before calling this function. More... | |
| static bool | VolumeUp () |
| Increases the volume. Note: Call InitAudioDevice to initialize the audio device before calling this function. More... | |
| static bool | VolumeDown () |
| Decreases the volume. Note: Call InitAudioDevice to initialize the audio device before calling this function. More... | |
| static bool | SetVolumeNum (int volume) |
| Sets the volume. Note: Call InitAudioDevice to initialize the audio device before calling this function. More... | |
| static PXR_PlatformSetting.simulationType | IsCurrentDeviceValid () |
| Checks whether the current device has valid permission for the game. More... | |
| static string | GetSDKVersion () |
| Gets the SDK version. More... | |
| static double | GetPredictedDisplayTime () |
| Gets the predicted time a frame will be displayed after being rendered. More... | |
| static bool | SetExtraLatencyMode (int mode) |
| Sets the extra latency mode. Note: Call this function once only. More... | |
| static string | StateGetDeviceInfo (SystemInfoEnum type) |
| Gets the specified type of device information. More... | |
| static void | ControlSetDeviceAction (DeviceControlEnum deviceControl, Action< int > callback) |
| Controls the device to shut down or reboot. More... | |
| static void | ControlAPPManager (PackageControlEnum packageControl, string path, Action< int > callback) |
| Installs or uninstalls app silently. More... | |
| static void | ControlSetAutoConnectWIFI (string ssid, string pwd, Action< bool > callback) |
| Sets a Wi-Fi that the device is automatically connected to. More... | |
| static void | ControlClearAutoConnectWIFI (Action< bool > callback) |
| Removes the Wi-Fi that the device is automatically connected to. More... | |
| static void | PropertySetHomeKey (HomeEventEnum eventEnum, HomeFunctionEnum function, Action< bool > callback) |
| Sets the Home key event. More... | |
| static void | PropertySetHomeKeyAll (HomeEventEnum eventEnum, HomeFunctionEnum function, int timesetup, string pkg, string className, Action< bool > callback) |
| Sets extended settings for the Home key. More... | |
| static void | PropertyDisablePowerKey (bool isSingleTap, bool enable, Action< int > callback) |
| Sets the Power key event. More... | |
| static void | PropertySetScreenOffDelay (ScreenOffDelayTimeEnum timeEnum, Action< int > callback) |
| Sets the time the screen turns off when the device is not in use. More... | |
| static void | PropertySetSleepDelay (SleepDelayTimeEnum timeEnum) |
| Sets the time the system sleeps when the device is not in use. More... | |
| static void | SwitchSystemFunction (SystemFunctionSwitchEnum systemFunction, SwitchEnum switchEnum) |
| Switches specified system function on/off. More... | |
| static void | SwitchSetUsbConfigurationOption (USBConfigModeEnum uSBConfigModeEnum) |
| Sets the USB configuration mode. More... | |
| static void | ScreenOn () |
| Turns the screen on. More... | |
| static void | ScreenOff () |
| Turns the screen off. More... | |
| static void | AcquireWakeLock () |
| Acquires the wake lock. More... | |
| static void | ReleaseWakeLock () |
| Releases the wake lock. More... | |
| static void | EnableEnterKey () |
| Enables the Confirm key. More... | |
| static void | DisableEnterKey () |
| Disables the Confirm key. More... | |
| static void | EnableVolumeKey () |
| Enables the Volume Key. More... | |
| static void | DisableVolumeKey () |
| Disables the Volume Key. More... | |
| static void | EnableBackKey () |
| Enables the Back Key. More... | |
| static void | DisableBackKey () |
| Disables the Back Key. More... | |
| static void | WriteConfigFileToDataLocal (string path, string content, Action< bool > callback) |
| Writes the configuration file to the /data/local/tmp/ path. More... | |
| static void | ResetAllKeyToDefault (Action< bool > callback) |
| Resets all keys to default configuration. More... | |
| static void | SetAPPAsHome (SwitchEnum switchEnum, string packageName) |
| Sets an app as the launcher app. More... | |
| static void | KillAppsByPidOrPackageName (int[] pids, string[] packageNames) |
| Force quits app(s) by passing app PID or package name. More... | |
| static void | KillBackgroundAppsWithWhiteList (string[] packageNames) |
| Force quits background app(s) expect those in the allowlist. More... | |
| static void | FreezeScreen (bool freeze) |
| Freezes the screen to the front. The screen will turn around with the HMD. Note: This function only supports G2 4K series. More... | |
| static void | OpenMiracast () |
| Turns on the screencast function. More... | |
| static bool | IsMiracastOn () |
| Gets the status of the screencast function. More... | |
| static void | CloseMiracast () |
| Turns off the screencast function. More... | |
| static void | StartScan () |
| Starts scanning for devices that can be used for screen casting. More... | |
| static void | StopScan () |
| Stops scanning for devices that can be used for screen casting. More... | |
| static void | ConnectWifiDisplay (string modelJson) |
| Casts the screen to the specified device. More... | |
| static void | DisConnectWifiDisplay () |
| Stops casting the screen to the current device. More... | |
| static void | ForgetWifiDisplay (string address) |
| Forgets the device that have been connected for screencast. More... | |
| static void | RenameWifiDisplay (string address, string newName) |
| Renames the device connected for screencast (only the name for local storage). More... | |
| static void | SetWDModelsCallback () |
| Returns a wdmodel list of the device(s) for screencast. More... | |
| static void | SetWDJsonCallback () |
| Returns a JSON array of the device(s) for screencast. More... | |
| static void | UpdateWifiDisplays (Action< string > callback) |
| Manually updates the device list for screencast. More... | |
| static string | GetConnectedWD () |
| Gets the information of the current connected device. More... | |
| static void | SwitchLargeSpaceScene (bool open, Action< bool > callback) |
| Switches the large space scene on. More... | |
| static void | GetSwitchLargeSpaceStatus (Action< string > callback) |
| Gets the status of the large space scene. More... | |
| static bool | SaveLargeSpaceMaps () |
| Saves the large space map. More... | |
| static void | ExportMaps (Action< bool > callback) |
| Exports map(s). More... | |
| static void | ImportMaps (Action< bool > callback) |
| Imports map(s). More... | |
| static int | GetSensorStatus () |
| Gets the sensor's status. More... | |
| static void | SetSystemDisplayFrequency (float rate) |
| Sets the system display frequency rate. More... | |
| static float | GetSystemDisplayFrequency () |
| Gets the system display frequency rate. More... | |
| static void | SetLargeSpaceEnable (bool value) |
| Gets whether the current app supports large space. More... | |
| static int | GetPredictedMainSensorStateNew (ref PxrSensorState2 sensorState, ref int sensorFrameIndex) |
| Gets the predicted status of the sensor. More... | |
| static float[] | GetCpuUsages () |
| Gets the CPU utilization of the current device. More... | |
| static float[] | GetDeviceTemperatures (int type, int source) |
| Gets device temperature in Celsius. More... | |
| static void | Capture () |
| Captures the current screen. More... | |
| static void | Record () |
| Records the screen. Call this function again to stop recording. More... | |
| static void | ControlSetAutoConnectWIFIWithErrorCodeCallback (String ssid, String pwd, int ext, Action< int > callback) |
| Connects the device to a specified Wi-Fi. More... | |
| static void | AppKeepAlive (String appPackageName, bool keepAlive, int ext) |
| Keeps an app active. In other words, improves the priority of an app, thereby making the system not to force quit the app. More... | |
| static void | TimingStartup (int year, int month, int day, int hour, int minute, bool open) |
| Schedules automatic startup for the device. Note: Supported by Neo 3 series only. More... | |
| static void | TimingShutdown (int year, int month, int day, int hour, int minute, bool open) |
| Schedules automatic shutdown for the device. Note: Supported by Neo 3 series only. More... | |
| static void | StartVrSettingsItem (StartVRSettingsEnum settingsEnum, bool showOtherItem, int ext) |
| Displays a specified settings screen. Note: Supported by Neo 3 series only. More... | |
|
static |
Initializes the system service for a specified game object.
Note: Must be called before calling other system related functions.
| objectName | The name of the game object to initialize the system service for. |
|
static |
Binds the system service.
Note: Must be called before calling other system related functions.
|
static |
Unbinds the system service.
|
static |
Turns on the battery service.
| objName | The name of the game object to turn on the battery service for. |
true: succeeded false: failed
|
static |
Turns off the battery service.
true: succeeded false: failed
|
static |
Sets the brightness for the current HMD.
| brightness | Target brightness. The valid value ranges from 0 to 255. |
true: succeeded false: failed
|
static |
Gets the brightness of the current HMD.
0 to 255.
|
static |
Gets the brightness level of the current screen.
|
static |
Sets a brightness level for the current screen.
| brightness | Brightness mode:
|
| level | Brightness level. The valid value ranges from 1 to 255. If brightness is set to 1, set a desired brightness level; if brightness is set to 0, the system default brightness setting is adopted. |
|
static |
Initializes the audio device.
true: succeeded false: failed
|
static |
Turns on the volume service for a specified game pbject.
| objName | The name of the game object to turn on the volume service for. |
true: succeeded false: failed
|
static |
Turns off the volume service.
true: succeeded false: failed
|
static |
Gets the maximum volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.
|
static |
Gets the current volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.
0 to 15.
|
static |
Increases the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.
true: succeeded false: failed
|
static |
Decreases the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.
true: succeeded false: failed
|
static |
Sets the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.
| volume | The target volume. The valid value ranges from 0 to 15. |
true: succeeded false: failed
|
static |
Checks whether the current device has valid permission for the game.
Null Invalid Valid
|
static |
Gets the SDK version.
|
static |
Gets the predicted time a frame will be displayed after being rendered.
|
static |
Sets the extra latency mode. Note: Call this function once only.
| mode | The latency mode:
|
true: succeeded false: failed
|
static |
Gets the specified type of device information.
| type | The target informaiton type. Enumerations:
|
CHARGING_STATUS, an int value will be returned: 2-charging; 3-not charging.
|
static |
Controls the device to shut down or reboot.
| deviceControl | Device action. Enumerations:
|
| callback | Callback:
|
|
static |
Installs or uninstalls app silently.
| packageControl | The action. Enumerations:
|
| path | The path to the app package for silent installation or the name of the app package for silent uninstallation. |
| callback | Callback:
|
|
static |
Sets a Wi-Fi that the device is automatically connected to.
| ssid | Wi-Fi name. |
| pwd | Wi-Fi password. |
| callback | Callback:
|
|
static |
Removes the Wi-Fi that the device is automatically connected to.
| callback | Callback:
|
|
static |
Sets the Home key event.
| eventEnum | Target event. Enumerations:
|
| function | The function of the event. Enumerations:
|
| callback | Callback:
|
|
static |
Sets extended settings for the Home key.
| eventEnum | Target event. Enumerations:
|
| function | The function of the event. Enumerations:
|
| timesetup | The interval of key pressing is set only if there is the double click event or long pressing event. When shortly pressing the Home key, pass 0. |
| pkg | Pass null. |
| className | Pass null. |
| callback | Callback:
|
|
static |
Sets the Power key event.
| isSingleTap | Whether it is a single click event:
|
| enable | Key enabling status:
|
| callback | Callback:
|
|
static |
Sets the time the screen turns off when the device is not in use.
| timeEnum | Screen off timeout. Enumerations:
|
| callback | Callback:
|
|
static |
Sets the time the system sleeps when the device is not in use.
| timeEnum | System sleep timeout. Enumerations:
|
|
static |
Switches specified system function on/off.
| systemFunction | Function name. Enumerations:
|
| switchEnum | Whether to switch the function on/off:
|
|
static |
Sets the USB configuration mode.
| uSBConfigModeEnum | USB configuration mode. Enumerations:
|
|
static |
Turns the screen on.
|
static |
Turns the screen off.
|
static |
Acquires the wake lock.
|
static |
Releases the wake lock.
|
static |
Enables the Confirm key.
|
static |
Disables the Confirm key.
|
static |
Enables the Volume Key.
|
static |
Disables the Volume Key.
|
static |
Enables the Back Key.
|
static |
Disables the Back Key.
|
static |
Writes the configuration file to the /data/local/tmp/ path.
| path | The path to the configuration file, e.g., /data/local/tmp/config.txt. |
| content | The content of the configuration file. |
| callback | Callback:
|
|
static |
Resets all keys to default configuration.
| callback | Callback:
|
|
static |
Sets an app as the launcher app.
| switchEnum | Switch. Enumerations:
|
| packageName | The app package name. |
|
static |
Force quits app(s) by passing app PID or package name.
| pids | An array of app PID(s). |
| packageNames | An array of package name(s). |
|
static |
Force quits background app(s) expect those in the allowlist.
| packageNames | An array of package name(s) to be added to the allowlist. The corresponding app(s) in the allowlist will not be force quit. |
|
static |
Freezes the screen to the front. The screen will turn around with the HMD.
Note: This function only supports G2 4K series.
| freeze | Whether to freeze the screen:
|
|
static |
Turns on the screencast function.
|
static |
Gets the status of the screencast function.
true: screencast on false: screencast off
|
static |
Turns off the screencast function.
|
static |
Starts scanning for devices that can be used for screen casting.
|
static |
Stops scanning for devices that can be used for screen casting.
|
static |
Casts the screen to the specified device.
| modelJson | A modelJson structure containing the following fields:
|
|
static |
Stops casting the screen to the current device.
|
static |
Forgets the device that have been connected for screencast.
| address | Device address. |
|
static |
Renames the device connected for screencast (only the name for local storage).
| address | The MAC address of the device. |
| newName | The new device name. |
|
static |
Returns a wdmodel list of the device(s) for screencast.
|
static |
Returns a JSON array of the device(s) for screencast.
|
static |
Manually updates the device list for screencast.
| callback | The device list for screencast. |
|
static |
Gets the information of the current connected device.
|
static |
Switches the large space scene on.
| open | Whether to switch the large space scene on:
|
| callback | Callback:
|
|
static |
Gets the status of the large space scene.
| callback | Callback:
|
|
static |
Saves the large space map.
true: saved false: failed to save
|
static |
Exports map(s).
| callback | Callback:
|
|
static |
Imports map(s).
| callback | Callback:
|
|
static |
Gets the sensor's status.
0: null 1: 3 DoF 3: 6 DoF
|
static |
Sets the system display frequency rate.
| rate | The frequency rate:
|
|
static |
Gets the system display frequency rate.
|
static |
Gets whether the current app supports large space.
| value | A bool value:
|
|
static |
Gets the predicted status of the sensor.
| sensorState | Sensor's coordinate:
|
| sensorFrameIndex | Sensor frame index. |
|
static |
Gets the CPU utilization of the current device.
|
static |
Gets device temperature in Celsius.
| type | The requested type of device temperature:
|
| source | The requested source of device temperature:
|
|
static |
Captures the current screen.
|
static |
Records the screen. Call this function again to stop recording.
|
static |
Connects the device to a specified Wi-Fi.
| ssid | Wi-Fi name. |
| pwd | Wi-Fi password. |
| ext | Reserved parameter, pass 0 by default. |
| callback | The callback for indicating whether the Wi-Fi connection is successful:
|
|
static |
Keeps an app active. In other words, improves the priority of an app, thereby making the system not to force quit the app.
| appPackageName | App package name. |
| keepAlive | Whether to keep the app active (i.e., whether to enhance the priority of the app):
|
| ext | Reserved parameter, pass 0 by default. |
|
static |
Schedules automatic startup for the device.
Note: Supported by Neo 3 series only.
| year | Year, for example, 2022. |
| month | Month, for example, 2. |
| day | Day, for example, 22. |
| hour | Hour, for example, 22. |
| minute | Minute, for example, 22. |
| open | Whether to enable scheduled auto startup for the device:
|
|
static |
Schedules automatic shutdown for the device.
Note: Supported by Neo 3 series only.
| year | Year, for example, 2022. |
| month | Month, for example, 2. |
| day | Day, for example, 22. |
| hour | Hour, for example, 22. |
| minute | Minute, for example, 22. |
| open | Whether to enable scheduled auto shutdown for the device:
|
|
static |
Displays a specified settings screen.
Note: Supported by Neo 3 series only.
| settingsEnum | The enumerations of settings screen:
|
| showOtherItem | Whether to display the selected settings screen:
|
| ext | Reserved parameter, pass 0 by default. |