Version: Unity 6.2 (6000.2)
LanguageEnglish
  • C#

PlayerSettings.Android.appCategory

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 string appCategory;

Description

Specify the category for your application that best represents its primary functionality.

Refer to the Android documentation for the available category options.

Notes:

  • For new projects, this property is enabled and set to Game by default.
  • For existing projects with PlayerSettings.Android.androidIsGame set to false, this property remains disabled.
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;

public class AppCategorySample : MonoBehaviour { [MenuItem("Build/AppCategory Sample")] public static void BuildAndroidAppCategorySample() { PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP); PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64;

//Set App Category value to game PlayerSettings.Android.appCategory = "game";

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