// Token: 0x06001BE0 RID: 7136 RVA: 0x000917F0 File Offset: 0x0008F9F0 public static GameObject FindEvenInactiveGameObject <T>(string gameObjectName = null) where T : Component { if (!string.IsNullOrEmpty(gameObjectName)) { Scene activeScene = SceneManager.GetActiveScene(); return((from component in Resources.FindObjectsOfTypeAll <T>() select component.gameObject into gameObject where gameObject.scene == activeScene select gameObject).Select(delegate(GameObject gameObject) { Transform transform = gameObject.transform.Find(gameObjectName); if (!(transform == null)) { return transform.gameObject; } return null; }).FirstOrDefault((GameObject gameObject) => gameObject != null)); } T t = VRTK_SharedMethods.FindEvenInactiveComponent <T>(); if (!(t == null)) { return(t.gameObject); } return(null); }
// Token: 0x0600134D RID: 4941 RVA: 0x0006BECC File Offset: 0x0006A0CC public override Transform GetHeadsetCamera() { this.cachedHeadsetCamera = base.GetSDKManagerHeadset(); if (this.cachedHeadsetCamera == null) { SteamVR_Camera steamVR_Camera = VRTK_SharedMethods.FindEvenInactiveComponent <SteamVR_Camera>(); if (steamVR_Camera) { this.cachedHeadsetCamera = steamVR_Camera.transform; } } return(this.cachedHeadsetCamera); }
// Token: 0x06001315 RID: 4885 RVA: 0x0006B27C File Offset: 0x0006947C public override Transform GetPlayArea() { this.cachedPlayArea = base.GetSDKManagerPlayArea(); if (this.cachedPlayArea == null) { SteamVR_PlayArea steamVR_PlayArea = VRTK_SharedMethods.FindEvenInactiveComponent <SteamVR_PlayArea>(); if (steamVR_PlayArea != null) { this.cachedSteamVRPlayArea = steamVR_PlayArea; this.cachedPlayArea = steamVR_PlayArea.transform; } } return(this.cachedPlayArea); }
protected virtual void OnEnable() { playArea = VRTK_DeviceFinder.PlayAreaTransform(); if (objectControlScript) { switch (listenOnAxisChange) { case AxisListeners.XAxisChanged: objectControlScript.XAxisChanged += AxisChanged; break; case AxisListeners.YAxisChanged: objectControlScript.YAxisChanged += AxisChanged; break; } } internalBodyPhysics = (internalBodyPhysics == null ? VRTK_SharedMethods.FindEvenInactiveComponent <VRTK_BodyPhysics>() : internalBodyPhysics); }