Class ApplicationInfo
- Namespace
- Homa.Sdk.Foundation
- Assembly
- Homa.Sdk.Foundation.dll
Provides thread-safe access to runtime-static properties whose values do not change during runtime. It abstracts Unity/System properties which are readonly but for some reason call engine code, which can only be called from main thread.
[InitializeOnLoad]
public static class ApplicationInfo
- Inheritance
-
ApplicationInfo
- Inherited Members
Remarks
Keep in mind, that this class needs to be initialized only once, regardless of soft restart. No properties in this class will change values w/o full app restart. This class self-initializes, but its initialization can be accelerated, by referencing any of the fields.
Fields
Active
Currently active implementation of IApplicationInfo
public static readonly IApplicationInfo Active
Field Value
Properties
ApplicationBuildNumber
Build number of the current version.
public static string ApplicationBuildNumber { get; }
Property Value
ApplicationIdentifier
Application identifier at runtime. On Apple platforms this is the 'bundleIdentifier' saved in the Info.plist file, on Android it's the 'package' from the AndroidManifest.xml
public static string ApplicationIdentifier { get; }
Property Value
ApplicationVersion
Application version number.
public static string ApplicationVersion { get; }
Property Value
DataPath
Path to the game data directory.
public static string DataPath { get; }
Property Value
DeviceModel
Model of the device running the application.
public static string DeviceModel { get; }
Property Value
DeviceOs
Name of the OS for the executing device
public static string DeviceOs { get; }
Property Value
DeviceOsVersion
OS version string, containing only the numeric value. It should not be used for comparison, as some platform APIs do not guarantee they can be compared or sorted. In Unity Editor returns UnityVersion. Returns "0" when version is not available. Fallbacks to DeviceOs for other platforms than mobile or editor.
public static string DeviceOsVersion { get; }
Property Value
DeviceUniqueIdentifier
Unique device identifier. Uses UnityEngine.SystemInfo.deviceUniqueIdentifier.
public static string DeviceUniqueIdentifier { get; }
Property Value
Remarks
Note that this identifier is not guaranteed to be in guid format for all platforms.
IsBatchMode
Is Unity is launched with the -batchmode flag from the command line.
public static bool IsBatchMode { get; }
Property Value
IsDevelopmentBuild
Is the 'Development Build' is set as a build option.
In Editor always returns true.
public static bool IsDevelopmentBuild { get; }
Property Value
IsEditor
Is the application running inside the Unity editor?
public static bool IsEditor { get; }
Property Value
PersistentDataPath
Path to a persistent data directory.
public static string PersistentDataPath { get; }
Property Value
RuntimePlatformName
Name of the target runtime platform.
public static string RuntimePlatformName { get; }
Property Value
StreamingAssetsPath
Path to the StreamingAssets directory.
public static string StreamingAssetsPath { get; }
Property Value
TargetRuntimePlatform
Target runtime platform.
public static TargetRuntimePlatform TargetRuntimePlatform { get; }
Property Value
TemporaryCachePath
Path to the cache directory.
public static string TemporaryCachePath { get; }
Property Value
UnityVersion
Version of the Unity runtime.
public static string UnityVersion { get; }
Property Value
UserAgent
User agent name of the target runtime platform for Homa services.
public static string UserAgent { get; }