Ejemplo n.º 1
0
        public static VRLoader Create(bool isEnable)
        {
            isVREnable = isEnable;
            instance   = new GameObject("VRLoader").AddComponent <VRLoader>();

            return(instance);
        }
Ejemplo n.º 2
0
        protected virtual void Awake()
        {
            windowBackground = new Texture2D(1, 1, TextureFormat.ARGB32, false);
            windowBackground.SetPixel(0, 0, new Color(0.5f, 0.5f, 0.5f, 1));
            windowBackground.Apply();

            //Harmony.CreateAndPatchAll(typeof(IllusionVRCore));

            IVRLog.SetLogger(Logger);
            VRLog.LogCall += (x, y) => IVRLog.Log(ConvertLogLevel(y), x);

            bool vrDeactivated = Environment.CommandLine.Contains("--novr");
            bool vrActivated   = Environment.CommandLine.Contains("--vr");

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