public static VRLoader Create(bool isEnable) { _isVREnable = isEnable; _Instance = new GameObject("VRLoader").AddComponent <VRLoader>(); return(_Instance); }
/// <summary> /// Determines when to boot the VR code. In most cases, it makes sense to do the check as described here. /// </summary> void Awake() { CameraResetPos = Vector3.zero; CameraResetRot = Quaternion.identity; bool vrDeactivated = Environment.CommandLine.Contains("--novr"); bool vrActivated = Environment.CommandLine.Contains("--vr"); VRLog.Info($"Screen Size {Screen.width} x {Screen.height}"); if (vrActivated || (!vrDeactivated && SteamVRDetector.IsRunning)) { VR_ACTIVATED = true; VRLoader.Create(true); VRColliderHelper.pluginInstance = this; VRColliderHelper.TriggerHelperCoroutine(); } else { VRLog.Info("Not using VR"); // Don't do anything //VRLoader.Create(false); } }
/// <summary> /// Determines when to boot the VR code. In most cases, it makes sense to do the check as described here. /// </summary> void Awake() { bool vrDeactivated = Environment.CommandLine.Contains("--novr"); bool vrActivated = Environment.CommandLine.Contains("--vr"); if (vrActivated || (!vrDeactivated && SteamVRDetector.IsRunning)) { VRLoader.Create(true); } else { VRLog.Info("Not using VR"); // Don't do anything //VRLoader.Create(false); } }