LeopotamGroup.Gui.Common.GuiSystem.FixScaleFactors C# (CSharp) Method

FixScaleFactors() public method

public FixScaleFactors ( ) : void
return void
        void FixScaleFactors()
        {
            if (Screen.width != _lastScreenWidth || Screen.height != _lastScreenHeight) {
                _lastScreenWidth = Screen.width;
                _lastScreenHeight = Screen.height;
                VirtualToRealScaleFactor = _lastScreenHeight / (float) ScreenHeight;

                foreach (var lbl in FindObjectsOfType<GuiLabel> ()) {
                    lbl.UpdateVisuals (GuiDirtyType.Geometry);
                }
            }
        }