Esempio n. 1
0
        private void Init()
        {
            //TODO: Replace this with one activated from the core and figure out the min value.
            if (!FloatString.Inited || FloatString.MinValue > -1000f || FloatString.MaxValue < 16384f)
            {
                FloatString.Init(-1001f, 16386f);
            }

            m_graphyManager = transform.root.GetComponentInChildren <GraphyManager>();

            m_sb = new StringBuilder();

            m_rectTransform = GetComponent <RectTransform>();

            m_processorTypeText.text = "CPU: " + SystemInfo.processorType + " [" + SystemInfo.processorCount + " cores]";

            m_systemMemoryText.text = "RAM: " + SystemInfo.systemMemorySize + " MB";

            m_graphicsDeviceVersionText.text = "Graphics API: " + SystemInfo.graphicsDeviceVersion;
            m_graphicsDeviceNameText.text    = "GPU: " + SystemInfo.graphicsDeviceName;
            m_graphicsMemorySizeText.text
                = "VRAM: " + SystemInfo.graphicsMemorySize
                  + "MB. Max texture size: "
                  + SystemInfo.maxTextureSize
                  + "px. Shader level: "
                  + SystemInfo.graphicsShaderLevel;

            Resolution res = Screen.currentResolution;

            m_screenResolutionText.text = "Screen: " + res.width + "x" + res.height + "@" + res.refreshRate + "Hz";

            m_operatingSystemText.text = "OS: " + SystemInfo.operatingSystem + " [" + SystemInfo.deviceType + "]";

            float preferredWidth = 0;

            // Resize the background overlay

            List <Text> texts = new List <Text>()
            {
                m_graphicsDeviceVersionText, m_processorTypeText, m_systemMemoryText, m_graphicsDeviceNameText,
                m_graphicsMemorySizeText, m_screenResolutionText, m_gameWindowResolutionText, m_operatingSystemText
            };

            foreach (var text in texts)
            {
                if (text.preferredWidth > preferredWidth)
                {
                    preferredWidth = text.preferredWidth;
                }
            }

            m_backgroundImages[0].rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, preferredWidth + 10);
            m_backgroundImages[0].rectTransform.anchoredPosition = new Vector2
                                                                   (
                (preferredWidth + 15) / 2 * Mathf.Sign(m_backgroundImages[0].rectTransform.anchoredPosition.x),
                m_backgroundImages[0].rectTransform.anchoredPosition.y
                                                                   );

            UpdateParameters();
        }
Esempio n. 2
0
        private void Init()
        {
            if (!FloatString.Inited || FloatString.minValue > -1000f || FloatString.maxValue < 16384f)
            {
                FloatString.Init(-1001f, 16386f);
            }

            m_graphyManager = transform.root.GetComponentInChildren <GraphyManager>();

            m_fpsMonitor = GetComponent <FpsMonitor>();

            UpdateParameters();
        }
Esempio n. 3
0
        private void Init()
        {
            //TODO: Replace this with one activated from the core and figure out the min value.
            if (!FloatString.Inited || FloatString.MinValue > -1000f || FloatString.MaxValue < 16384f)
            {
                FloatString.Init(-1001f, 16386f);
            }

            m_graphyManager = transform.root.GetComponentInChildren <GraphyManager>();

            m_fpsMonitor = GetComponent <FpsMonitor>();

            UpdateParameters();
        }