コード例 #1
0
ファイル: VRLoader.cs プロジェクト: OrangeSpork/HS2VR
        public static VRLoader Create(bool isEnable)
        {
            _isVREnable = isEnable;
            _Instance   = new GameObject("VRLoader").AddComponent <VRLoader>();

            return(_Instance);
        }
コード例 #2
0
        /// <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);
            }
        }
コード例 #3
0
        /// <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);
            }
        }