Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

PlayerSettings.Android.showActivityIndicatorOnLoading

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public static AndroidShowActivityIndicatorOnLoading showActivityIndicatorOnLoading;

Description

Specifies whether and how to display an activity indicator when the Android application is loading.

The activity indicator displays while the first scene loads. If the Splash Screen is enabled in the Player settings, the activity indicator also displays while the splash screen is visible.

using UnityEngine;
using UnityEditor;
using UnityEditor.Build;

public class ShowActivityIndicatorOnLoadingSample : MonoBehaviour { [MenuItem("Build/Show Activity Indicator On Loading Sample")] public static void BuildShowActivityIndicatorOnLoadingSample() { PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP); PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64;

//Set showActivityindicatorOnLoading to Large PlayerSettings.Android.showActivityIndicatorOnLoading = AndroidShowActivityIndicatorOnLoading.Large;

BuildPlayerOptions options = new BuildPlayerOptions(); options.scenes = new[] { "Assets/Scenes/SampleScene.unity" }; options.locationPathName = "Build/AndroidBuild.apk"; options.target = BuildTarget.Android; options.targetGroup = BuildTargetGroup.Android; BuildPipeline.BuildPlayer(options); } }