Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

AppInfo

class in Unity.Localization.Android

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

Description

Stores the localized values that describe an Android application in its resources.

These are the values the operating system shows while the application is not running, such as the name and icon under the launcher entry. Unity reads this object after it generates the Gradle project, resolves each value in every enabled locale, and writes the results as localized Android resources. Each property names the resource it holds the value for. A value is resolved once per locale, so it cannot use Smart Strings; the operating system reads the built resources without Unity running. Configure it before building, and reach it through LocalizationSettings.AndroidAppInfo. No property ever reads as null: assigning null stores an empty value instead, so a property can always be read and configured without a null check.

Additional resources: LocalizationSettings, AppInfo, Icons

Configure the Android application name before a build.

using Unity.Localization;
using Android = Unity.Localization.Android;

namespace Unity.Localization.Samples { public class AndroidAppInfoExample { public void Run(Android.AppInfo appInfo) { appInfo.DisplayName.SetReference("App Strings", "App Display Name"); } } }

Properties

Property Description
AdaptiveIcons The layered launcher icons used from Android 8.0 onwards.
DisplayName The user-visible name of the application.
LegacyIcons The square launcher icons used by devices before adaptive icons.
RoundIcons The circular launcher icons used by launchers that ask for a round icon.