GooglePlayInstant/LoadingScreen/LoadingBar.cs
/// <summary>
/// Sets the position and size of the loading bar as a function of the screen heighta and width. 
/// </summary>
Sets the position and size of the loading bar as a function of the screen heighta and width.
Sets the position and size of the loading bar as a function of the screen heighta and width .
public static void UpdateSizeAndPostition()
        {
            var loadingBarRectTransform = GameObject.Find(LoadingBarGameObjectName).GetComponent<RectTransform>();
            var loadingBarFillRectTransform =
                GameObject.Find(LoadingBarFillGameObjectName).GetComponent<RectTransform>();
            var loadingBarOutlineRectTransform =
                GameObject.Find(LoadingBarOutlineGameObjectName).GetComponent<RectTransform>();
            loadingBarRectTransform.position =
                new Vector2(Screen.width * LoadingBarPositionX, Screen.height * LoadingBarPositionY);
            loadingBarRectTransform.sizeDelta = new Vector2(Screen.width * LoadingBarWidthProportion,
                Screen.height * LoadingBarHeightProportion);
            loadingBarOutlineRectTransform.sizeDelta = loadingBarRectTransform.sizeDelta;
            loadingBarFillRectTransform.sizeDelta =
                new Vector2(0.0f, loadingBarRectTransform.sizeDelta.y - LoadingBarFillPadding);
        }
public static void UpdateSizeAndPostition ( ) { var loadingBarRectTransform = GameObject . Find ( LoadingBarGameObjectName ) . GetComponent < RectTransform > ( ) ; var loadingBarFillRectTransform = GameObject . Find ( LoadingBarFillGameObjectName ) . GetComponent < RectTransform > ( ) ; var loadingBarOutlineRectTransform = GameObject . Find ( LoadingBarOutlineGameObjectName ) . GetComponent < RectTransform > ( ) ; loadingBarRectTransform . position = new Vector2 ( Screen . width * LoadingBarPositionX , Screen . height * LoadingBarPositionY ) ; loadingBarRectTransform . sizeDelta = new Vector2 ( Screen . width * LoadingBarWidthProportion , Screen . height * LoadingBarHeightProportion ) ; loadingBarOutlineRectTransform . sizeDelta = loadingBarRectTransform . sizeDelta ; loadingBarFillRectTransform . sizeDelta = new Vector2 ( 0.0f , loadingBarRectTransform . sizeDelta . y - LoadingBarFillPadding ) ; }
Sets the position and size of the loading bar as a function of the screen heighta and width.
Sets the position and size of the loading bar as a function of the screen heighta and width .