step
1. Install the SDK
2. Return to the homepage to become a developer, after registering the account and entering the homepage, the upper right corner is the appID
3. Import the downloaded SDK.unitypackage into the Asstes folder
VR Common Methods ( Pico_API )
premise
Note: Before writing the code, declare the namespace of the pico library: [using Pvr_UnitySDKAPI;] |
Note: If you want to use the handle, you need to add the [Pvr_ControllerManager] component |
handle
introduce |
method |
Get Controller connection status |
Pvr_UnitySDKAPI.Controller.UPvr_GetControllerState() |
Determine if the button is held down |
Pvr_UnitySDKAPI.Controller.UPvr_GetKey() |
Determine if a button is pressed |
Pvr_UnitySDKAPI.Controller.UPvr_GetKeyDown() |
Determine if the button is up |
Pvr_UnitySDKAPI.Controller.UPvr_GetKeyUp() |
Determine if the button is long pressed |
Pvr_UnitySDKAPI.Controller.UPvr_GetKeyLongPressed() |
Determine if the button is pressed and lifted once |
Pvr_UnitySDKAPI.Controller.UPvr_GetKeyClick() |
Arrow keys (joystick)
introduce |
method |
Determine if the Joystick key is up |
Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickUp() |
Determine if the Joystick key is down |
Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickDown() |
Determine if the Joystick key is to the left |
Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickLeft() |
Determine if the Joystick key is right |
Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickRight() |
helmet
Initialize the distance sensor |
Pvr_UnitySDKAPI. Sensor. UPvr_InitPsensor() |
Get the status of the headset proximity sensor |
Pvr_UnitySDKAPI. Sensor. UPvr_GetPsensorState() |
|
|
|
|
interact
Vibration interface for Neo2 handle |
Pvr_UnitySDKAPI.Controller.UPvr_VibrateNeo2Controller() |
Get handle connection status |
Pvr_UnitySDKAPI.Controller. UPvr_GetControllerBindingState() |
Initialize battery volume brightness service |
Pvr_UnitySDKAPI.VolumePowerBrightness.UPvr_InitBatteryVolClass() |
Turn on volume service |
Pvr_UnitySDKAPI.VolumePowerBrightness.UPvr_StartAudioReceiver () |
Turn off volume service |
Pvr_UnitySDKAPI.VolumePowerBrightness.UPvr_StopAudioReceiver() |
Neo Peak 2:
button |
input event |
|
Pvr_KeyCode.HOME |
|
Pvr_KeyCode.APP |
|
Pvr_KeyCode.TRIGGER |
|
Pvr_KeyCode.Right (handle 1 is Right) |
Pvr_KeyCode.Left (handle 0 is left) |
|
|
Pvr_KeyCode.X (handle 0) |
|
Pvr_KeyCode.Y (handle 0) |
|
Pvr_KeyCode.A (handle 1) |
|
Pvr_KeyCode.B (handle 1) |
|
Pvr_KeyCode.TOUCHPAD |