public static int GetVersionCode() { var versionCode = 0; #if UNITY_EDITOR // エディター. versionCode = PlayerSettings.Android.bundleVersionCode; #elif UNITY_ANDROID // Android実機. versionCode = AndroidUtil.getVersionCode(); #else // その他実機. #endif return(versionCode); }
public static string GetIdentifier() { var identifier = ""; #if UNITY_EDITOR // エディター. identifier = PlayerSettings.applicationIdentifier; #elif UNITY_ANDROID // Android実機. identifier = AndroidUtil.getPackageName(); #else // その他実機. #endif return(identifier); }