Exemple #1
0
        public static VRLoader Create(bool isEnable)
        {
            _isVREnable = isEnable;
            _Instance   = new GameObject("VRLoader").AddComponent <VRLoader>();

            return(_Instance);
        }
Exemple #2
0
        /// <summary>
        /// Determines when to boot the VR code. In most cases, it makes sense to do the check as described here.
        /// </summary>
        public void OnApplicationStart()
        {
            bool vrDeactivated = Environment.CommandLine.Contains("--novr");
            bool vrActivated   = Environment.CommandLine.Contains("--vr");

            if (vrActivated || (!vrDeactivated && SteamVRDetector.IsRunning))
            {
                VRLoader.Create(true);
            }
            else
            {
                VRLoader.Create(false);
            }
        }