FairyGUI.GRoot.ApplyContentScaleFactor C# (CSharp) Method

ApplyContentScaleFactor() public method

This is called after screen size changed.
public ApplyContentScaleFactor ( ) : void
return void
        public void ApplyContentScaleFactor()
        {
            this.SetSize(Mathf.CeilToInt(Screen.width / UIContentScaler.scaleFactor), Mathf.CeilToInt(Screen.height / UIContentScaler.scaleFactor));
            this.SetScale(UIContentScaler.scaleFactor, UIContentScaler.scaleFactor);
        }

Usage Example

 static public int ApplyContentScaleFactor(IntPtr l)
 {
     try {
         FairyGUI.GRoot self = (FairyGUI.GRoot)checkSelf(l);
         self.ApplyContentScaleFactor();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GRoot::ApplyContentScaleFactor