示例#1
0
        // Token: 0x06000026 RID: 38 RVA: 0x00003458 File Offset: 0x00001658

        public static object GetControllerObject(OculusInput.Controller c)
        {
            try
            {
                SteamVR_TrackedObject component = ((c == OculusInput.Controller.Left) ? OculusInput.GetSteamVR_ControllerManager().left : OculusInput.GetSteamVR_ControllerManager().right).GetComponent <SteamVR_TrackedObject>();
                int  index = component.GetIndex();
                bool flag  = index >= 0 && component.IsValid();
                if (flag)
                {
                    return(OculusInput.getSteamVRControllerById.Invoke(null, new object[]
                    {
                        index
                    }));
                }
            }
            catch (Exception value)
            {
                Console.WriteLine(value);
            }
            return(null);
        }