Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


showActivityIndicatorOnLoading

Specifies whether and how to display an activity indicator when the Android application is loading.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static AndroidShowActivityIndicatorOnLoading showActivityIndicatorOnLoading { get; set; }

Remarks

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.

Examples

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); }}