Table of Contents

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

IApplicationInfo

Properties

ApplicationBuildNumber

Build number of the current version.

public static string ApplicationBuildNumber { get; }

Property Value

string

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

string

ApplicationVersion

Application version number.

public static string ApplicationVersion { get; }

Property Value

string

DataPath

Path to the game data directory.

public static string DataPath { get; }

Property Value

string

DeviceModel

Model of the device running the application.

public static string DeviceModel { get; }

Property Value

string

DeviceOs

Name of the OS for the executing device

public static string DeviceOs { get; }

Property Value

string

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

string

DeviceUniqueIdentifier

Unique device identifier. Uses UnityEngine.SystemInfo.deviceUniqueIdentifier.

public static string DeviceUniqueIdentifier { get; }

Property Value

string

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

bool

IsDevelopmentBuild

Is the 'Development Build' is set as a build option. In Editor always returns true.

public static bool IsDevelopmentBuild { get; }

Property Value

bool

IsEditor

Is the application running inside the Unity editor?

public static bool IsEditor { get; }

Property Value

bool

PersistentDataPath

Path to a persistent data directory.

public static string PersistentDataPath { get; }

Property Value

string

RuntimePlatformName

Name of the target runtime platform.

public static string RuntimePlatformName { get; }

Property Value

string

StreamingAssetsPath

Path to the StreamingAssets directory.

public static string StreamingAssetsPath { get; }

Property Value

string

TargetRuntimePlatform

Target runtime platform.

public static TargetRuntimePlatform TargetRuntimePlatform { get; }

Property Value

TargetRuntimePlatform

TemporaryCachePath

Path to the cache directory.

public static string TemporaryCachePath { get; }

Property Value

string

UnityVersion

Version of the Unity runtime.

public static string UnityVersion { get; }

Property Value

string

UserAgent

User agent name of the target runtime platform for Homa services.

public static string UserAgent { get; }

Property Value

string