ドキュメント

Unity Engine

Unity Engine

resizeableActivity

Indicates whether your Android application is resizable.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

Remarks

By default the Android application is resizable. Disable this option to make the application non-resizable.
Note: If you enable this option, your application will continue to run when it loses focus but is visible on screen. If the application is minimized or no longer visible the Android Player will pause.

Examples

using UnityEngine;using UnityEditor;using UnityEditor.Build;public class ResizeableActivitySample : MonoBehaviour{ [MenuItem("Build/ResizeableActivity Sample")] public static void BuildResizeableActivitySample() { PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP); PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64; //Set resizeableActivity to true PlayerSettings.Android.resizeableActivity = true; 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); }}