# Google.Play.Common.LoadingScreen.LoadingBar

A loading bar that can be used to display download progress to the user.

## Summary

### Inheritance

Inherits from: MonoBehaviour

| ### Public attributes ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a5ad1a68f4a9b1a192b76e21e9c79967e = 0.8f` | `float` Proportion of the loading bar allocated to AssetBundle download progress. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a3ba4a3c50368beac93cd0b6162121387` | `RectTransform` The loading bar background. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a0ab4523d988aedce13e2360d9ff740ee = 6f` | `float` The inner border width. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a288644e945e21b794d24404152f1aa86` | `RectTransform` The loading bar outline. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a98363702d25c05b61351c309701be9bb = 6f` | `float` The outline width. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a42a80f829f83145c41a4e2a1a56fc6c4 = 0.25f` | `float` AssetBundle download and install progress. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1acfbc49a4419972030b24f26230b32b95` | `RectTransform` The loading bar progress fill. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1abd22a2cfb6a808d7099c46f6e0f7bdbc` | `RectTransform` The loading bar progress holder. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a0fbf24ceba7b33f1b33756d1e08185b0 = true` | `bool` If true, the [Outline](https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a288644e945e21b794d24404152f1aa86) and [Background](https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a3ba4a3c50368beac93cd0b6162121387) RectTransforms will update to match the outline and border width. |

| ### Public functions ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a9fc8159361fbe585ac07e39973fb8451()` | `void` Applies the border width to the loading bar. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1af0d58d3e713593e96f2709285c5fb136(AsyncOperation operation, float startingFillProportion, float endingFillProportion, bool skipFinalUpdate)` | `IEnumerator` Updates a loading bar by the progress made by an asynchronous operation. |
| `https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1adba4138a195f84e5e3eb5f279de94fec(float proportionOfLoadingBar)` | `void` Sets the loading bar progress to the specified value in the range \[0,1\]. |

## Public attributes

### AssetBundleDownloadToInstallRatio

```c#
float AssetBundleDownloadToInstallRatio = 0.8f
```
Proportion of the loading bar allocated to AssetBundle download progress.

The remainder of the loading bar is allocated to install progress.

### Background

```c#
RectTransform Background
```
The loading bar background.

### InnerBorderWidth

```c#
float InnerBorderWidth = 6f
```
The inner border width.

### Outline

```c#
RectTransform Outline
```
The loading bar outline.

### OutlineWidth

```c#
float OutlineWidth = 6f
```
The outline width.

### Progress

```c#
float Progress = 0.25f
```
AssetBundle download and install progress.

The value set in the Editor is ignored at runtime.

### ProgressFill

```c#
RectTransform ProgressFill
```
The loading bar progress fill.

### ProgressHolder

```c#
RectTransform ProgressHolder
```
The loading bar progress holder.

### ResizeAutomatically

```c#
bool ResizeAutomatically = true
```
If true, the [Outline](https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a288644e945e21b794d24404152f1aa86) and [Background](https://developer.android.com/reference/unity/class/Google/Play/Common/LoadingScreen/LoadingBar#classGoogle_1_1Play_1_1Common_1_1LoadingScreen_1_1LoadingBar_1a3ba4a3c50368beac93cd0b6162121387) RectTransforms will update to match the outline and border width.

## Public functions

### ApplyBorderWidth

```c#
void ApplyBorderWidth()
```
Applies the border width to the loading bar.

### FillUntilDone

```c#
IEnumerator FillUntilDone(
  AsyncOperation operation,
  float startingFillProportion,
  float endingFillProportion,
  bool skipFinalUpdate
)
```
Updates a loading bar by the progress made by an asynchronous operation.

The bar will interpolate between startingFillProportion and endingFillProportion as the operation progresses.

<br />

Details Parameters `operation` The AsyncOperation indicating progress. `startingFillProportion` The starting position from which to fill. `endingFillProportion` The ending position to fill to. `skipFinalUpdate` If true, the bar will only fill before the operation has finished. This is useful in cases where an async operation will set its progress to 1, even when it has failed.

### SetProgress

```c#
void SetProgress(
  float proportionOfLoadingBar
)
```
Sets the loading bar progress to the specified value in the range \[0,1\].

<br />

Details Parameters `proportionOfLoadingBar` The loading bar's current progress in the range \[0,1\].