This class does most of the heavy-lifting for connecting the PC to the smart device. This class can only have one Instance running for a given game and can be accessed via the Instance variable. The Instance variable allows you access all public methods and variables. The smart device sends data on two connections: one that sends pose data and another that sends RPC touch data
상속: MonoBehaviour
예제 #1
0
    /// <summary>
    /// First function that is called when scene is loading
    /// </summary>
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        DontDestroyOnLoad(this.gameObject);          //makes sure this game object or its children does not get destroyed when switching scenes
    }
예제 #2
0
    /// <summary>
    /// First function that is called when scene is loading
    /// </summary>
    void Awake()
    {
        OnResetHMD += UnityEngine.VR.InputTracking.Recenter;         //defaults to recenter DK2 or GearVR

        if (Instance == null)
        {
            Instance = this;
        }

        DontDestroyOnLoad(this.gameObject);          //makes sure this game object or its children does not get destroyed when switching scenes
    }
예제 #3
0
 /// <summary>
 /// Called when object is destroyed i.e. when game ends
 /// </summary>
 void OnDestroy()
 {
     NaviConnectionSDK.OnDeviceConnected -= DeviceConnected;
     Instance = null;
 }
예제 #4
0
    /// <summary>
    /// First function that is called when scene is loading
    /// </summary>
    void Awake()
    {
        if (Instance == null)
            Instance = this;

        DontDestroyOnLoad (this.gameObject); //makes sure this game object or its children does not get destroyed when switching scenes
    }
예제 #5
0
    /// <summary>
    /// First function that is called when scene is loading
    /// </summary>
    void Awake()
    {
        OnResetHMD += UnityEngine.VR.InputTracking.Recenter; //defaults to recenter DK2 or GearVR

        if (Instance == null)
            Instance = this;

        DontDestroyOnLoad (this.gameObject); //makes sure this game object or its children does not get destroyed when switching scenes
    }
예제 #6
0
 /// <summary>
 /// Called when object is destroyed i.e. when game ends
 /// </summary>
 void OnDestroy()
 {
     NaviConnectionSDK.OnDeviceConnected -= DeviceConnected;
     Instance = null;
 }