internal static void ApplySettings(
     AndroidBuildType androidBuildType   = AndroidBuildType.Release,
     AndroidSdkVersions minSdkVersion    = AndroidSdkVersions.AndroidApiLevel18,
     AndroidSdkVersions targetSdkVersion = AndroidSdkVersions.AndroidApiLevelAuto,
     AndroidPreferredInstallLocation preferredInstallLocation = AndroidPreferredInstallLocation.Auto,
     bool forceInternetPermission = true,
     bool forceSDCardPermission   = true,
     bool androidIsGame           = true
     )
 {
     UnityEditor.PlayerSettings.Android.androidIsGame            = androidIsGame;
     UnityEditor.PlayerSettings.Android.minSdkVersion            = minSdkVersion;
     UnityEditor.PlayerSettings.Android.targetSdkVersion         = targetSdkVersion;
     UnityEditor.PlayerSettings.Android.preferredInstallLocation = preferredInstallLocation;
     UnityEditor.PlayerSettings.Android.forceInternetPermission  = forceInternetPermission;
     UnityEditor.PlayerSettings.Android.forceSDCardPermission    = forceSDCardPermission;
 }
Ejemplo n.º 2
0
        private string PreferredInstallLocationAsString()
        {
            AndroidPreferredInstallLocation preferredInstallLocation = PlayerSettings.Android.preferredInstallLocation;

            if (preferredInstallLocation != AndroidPreferredInstallLocation.Auto)
            {
                if (preferredInstallLocation == AndroidPreferredInstallLocation.PreferExternal)
                {
                    return("preferExternal");
                }
                if (preferredInstallLocation == AndroidPreferredInstallLocation.ForceInternal)
                {
                    return("internalOnly");
                }
            }
            else
            {
                return("auto");
            }
            return("preferExternal");
        }