Example #1
0
 private void doAPICheck()
 {
     //check the graphics API, popup warning if using unsupported gfx (dx9/11/12/legacy-openGL)
     UnityEngine.Rendering.GraphicsDeviceType graphicsAPI = SystemInfo.graphicsDeviceType;
     if (graphicsAPI == UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore)
     {
         //noop, everything is fine
     }
     else if (graphicsAPI == UnityEngine.Rendering.GraphicsDeviceType.Direct3D11)
     {
         //works, but needs alternate render
         alternateRender = true;
     }
     else if (graphicsAPI == UnityEngine.Rendering.GraphicsDeviceType.Direct3D9)
     {
         //has issues -- display warning, and needs alternate render
         alternateRender = true;
         if (apiCheckGUI == null)
         {
             apiCheckGUI = this.gameObject.AddComponent <GraphicsAPIGUI>();
             apiCheckGUI.openGUI();
         }
     }
     else
     {
         //unknown API -- display warning
         if (apiCheckGUI == null)
         {
             apiCheckGUI = this.gameObject.AddComponent <GraphicsAPIGUI>();
             apiCheckGUI.openGUI();
         }
     }
 }
Example #2
0
        public void Start()
        {
            MonoBehaviour.print("TULoader - Start()");
            INSTANCE = this;
            DontDestroyOnLoad(this);
            if (partListLoadedEvent == null)
            {
                partListLoadedEvent = new EventVoid.OnEvent(onPartListLoaded);
                GameEvents.OnPartLoaderLoaded.Add(partListLoadedEvent);
            }

            //check the graphics API, popup warning if using unsupported gfx (dx9/11/12/legacy-openGL)
            UnityEngine.Rendering.GraphicsDeviceType graphicsAPI = SystemInfo.graphicsDeviceType;
            if (graphicsAPI == UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore)
            {
                //noop, everything is fine
            }
            else if (graphicsAPI == UnityEngine.Rendering.GraphicsDeviceType.Direct3D11)
            {
                //works, but needs alternate render
                alternateRender = true;
            }
            else if (graphicsAPI == UnityEngine.Rendering.GraphicsDeviceType.Direct3D9)
            {
                //has issues -- display warning, and needs alternate render
                alternateRender = true;
                if (apiCheckGUI == null)
                {
                    apiCheckGUI = this.gameObject.AddComponent <GraphicsAPIGUI>();
                    apiCheckGUI.openGUI();
                }
            }
            else
            {
                //unknown API -- display warning
                if (apiCheckGUI == null)
                {
                    apiCheckGUI = this.gameObject.AddComponent <GraphicsAPIGUI>();
                    apiCheckGUI.openGUI();
                }
            }
        }
Example #3
0
        public void Start()
        {
            MonoBehaviour.print("TULoader - Start()");
            INSTANCE = this;
            DontDestroyOnLoad(this);
            if (partListLoadedEvent == null)
            {
                partListLoadedEvent = new EventVoid.OnEvent(onPartListLoaded);
                GameEvents.OnPartLoaderLoaded.Add(partListLoadedEvent);
            }

            //check the graphics API, popup warning if using unsupported gfx (dx9/11/12/legacy-openGL)
            UnityEngine.Rendering.GraphicsDeviceType graphicsAPI = SystemInfo.graphicsDeviceType;
            if (graphicsAPI != UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore)
            {
                if (apiCheckGUI == null)
                {
                    apiCheckGUI = this.gameObject.AddComponent <GraphicsAPIGUI>();
                    apiCheckGUI.openGUI();
                }
            }
        }