文档

Unity Engine

Unity Engine

showActivityIndicatorOnLoading

Specifies whether and how to display an activity indicator when the Android application is loading.
阅读时间1 分钟最后更新于 1 个月前

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