😎 Generic components for use with XR
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets
Images
.gitignore
LICENSE
Makefile
README.md

README.md

XR Components

Features

  • XRControllerVibratation
  • XRInput
  • XRNodeController
  • Editor Scripts
    • InputManagerSetup

Installation

Unity Package Manager (Unity 2018.3)

https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.0/manual/index.html

{
    "dependencies": {
        "com.candycoded.xr-components": "https://github.com/CandyCoded/XR-Components.git#upm"
    }
}

Documentation

XRControllerVibration

XRInput

Reference: https://docs.unity3d.com/Manual/OculusControllers.html

Button

Name
One
Two
Three
Four
Start
PrimaryThumbstick
SecondaryThumbstick

Axis1D

Name
PrimaryIndexTrigger
SecondaryIndexTrigger
PrimaryHandTrigger
SecondaryHandTrigger

Axis2D

Name
PrimaryThumbstickHorizontal
PrimaryThumbstickVertical
SecondaryThumbstickHorizontal
SecondaryThumbstickVertical

Get

if (XRInput.Get(XRInput.Button.One)) {

    Debug.Log("Button One is being held");

}

GetDown

if (XRInput.GetDown(XRInput.Button.One)) {

    Debug.Log("Button One was pressed");

}

GetUp

if (XRInput.GetUp(XRInput.Button.One)) {

    Debug.Log("Button One was released");

}

XRNodeController