Ejemplo n.º 1
0
 /// <summary>
 /// The GetControllerByIndex method is used to find a controller based on it's unique index.
 /// </summary>
 /// <param name="index">The index of the actual controller to find.</param>
 /// <param name="getActual">An optional parameter that if true will return the game object that the SDK controller is attached to.</param>
 /// <returns>The actual controller GameObject that matches the given index.</returns>
 public static GameObject GetControllerByIndex(uint index, bool getActual)
 {
     return(VRTK_SDK_Bridge.GetControllerByIndex(index, getActual));
 }
Ejemplo n.º 2
0
        protected virtual GameObject GetValidObjectFromIndex()
        {
            GameObject checkObject = VRTK_SDK_Bridge.GetControllerByIndex(storedControllerIndex, false);

            return(checkObject == null ? VRTK_SDK_Bridge.GetControllerByIndex(storedControllerIndex, true) : checkObject);
        }