public override IEnumerator Execute(UTContext context)
    {
        if (UTPreferences.DebugMode) {
            Debug.Log ("Modifying Android player settings.", this);
        }
        var theBundleIdentifier = bundleIdentifier.EvaluateIn (context);
        if (string.IsNullOrEmpty (theBundleIdentifier)) {
            throw new UTFailBuildException ("You need to specify the bundle identifier.", this);
        }

        var theBundleVersion = bundleVersion.EvaluateIn (context);
        if (string.IsNullOrEmpty (theBundleVersion)) {
            throw new UTFailBuildException ("You need to specify the bundle version.", this);
        }

        var theKeyStore = keyStore.EvaluateIn(context);
        if (!string.IsNullOrEmpty(theKeyStore) && !File.Exists(theKeyStore)) {
            throw new UTFailBuildException("The specified keystore does not exist.", this);
        }

        PlayerSettings.defaultInterfaceOrientation = defaultOrientation.EvaluateIn (context);
        PlayerSettings.statusBarHidden = statusBarHidden.EvaluateIn (context);
        PlayerSettings.use32BitDisplayBuffer = use32BitDisplayBuffer.EvaluateIn (context);
        PlayerSettings.Android.use24BitDepthBuffer = use24BitDepthBuffer.EvaluateIn(context);
        PlayerSettings.Android.showActivityIndicatorOnLoading = showActivityIndicatorOnLoading.EvaluateIn (context);

        UTPlayerSettingsExt extPlayerSettings = new UTPlayerSettingsExt();
        extPlayerSettings.MobileSplashScreen = mobileSplashScreen.EvaluateIn(context);
        extPlayerSettings.Apply();
        PlayerSettings.Android.splashScreenScale = splashScaling.EvaluateIn(context);

        PlayerSettings.bundleIdentifier = theBundleIdentifier;
        PlayerSettings.bundleVersion = theBundleVersion;
        PlayerSettings.Android.bundleVersionCode = bundleVersionCode.EvaluateIn(context);
        PlayerSettings.Android.minSdkVersion = minimumApiLevel.EvaluateIn(context);

        PlayerSettings.Android.targetDevice = targetDevice.EvaluateIn (context);
        #if UNITY_3_5
        PlayerSettings.Android.targetGraphics = targetGraphics.EvaluateIn (context);
        #endif
        #if !UNITY_3_5
        PlayerSettings.targetGlesGraphics = targetGlesGraphics.EvaluateIn(context);
        #endif
        PlayerSettings.Android.preferredInstallLocation = installLocation.EvaluateIn (context);
        PlayerSettings.Android.forceInternetPermission = forceInternetPermission.EvaluateIn(context);
        PlayerSettings.Android.forceSDCardPermission = forceSDCardPermission.EvaluateIn (context);

        PlayerSettings.apiCompatibilityLevel = apiCompatibilityLevel.EvaluateIn(context);
        PlayerSettings.stripUnusedMeshComponents = optimizeMeshData.EvaluateIn(context);
        #if UNITY_3_5
        PlayerSettings.debugUnloadMode = debugUnloadMode.EvaluateIn(context);
        #endif

        PlayerSettings.Android.keystoreName = theKeyStore;
        PlayerSettings.Android.keystorePass = keyStorePassword.EvaluateIn(context);

        PlayerSettings.Android.keyaliasName = keyAlias.EvaluateIn(context);
        PlayerSettings.Android.keyaliasPass = keyPassword.EvaluateIn(context);

        if (UTPreferences.DebugMode) {
            Debug.Log ("Android player settings modified.", this);
        }

        yield return "";
    }
    public override IEnumerator Execute(UTContext context)
    {
        if (UTPreferences.DebugMode) {
            Debug.Log ("Modifying iOS player settings.", this);
        }
        var theBundleIdentifier = bundleIdentifier.EvaluateIn (context);
        if (string.IsNullOrEmpty (theBundleIdentifier)) {
            throw new UTFailBuildException ("You need to specify the bundle identifier.", this);
        }

        var theBundleVersion = bundleVersion.EvaluateIn (context);
        if (string.IsNullOrEmpty (theBundleVersion)) {
            throw new UTFailBuildException ("You need to specify the bundle version.", this);
        }

        var theFrequency = accelerometerFrequency.EvaluateIn(context);
        if (theFrequency != 0 && theFrequency != 15 && theFrequency != 30 && theFrequency != 60 && theFrequency != 100) {
            throw new UTFailBuildException("Invalid accelerometer frequency. Valid values for accelerometer frequencies are 0, 15, 30, 60 and 100.", this);
        }

        PlayerSettings.defaultInterfaceOrientation = defaultOrientation.EvaluateIn (context);
        PlayerSettings.statusBarHidden = statusBarHidden.EvaluateIn (context);
        PlayerSettings.iOS.statusBarStyle = statusBarStyle.EvaluateIn (context);
        PlayerSettings.use32BitDisplayBuffer = use32BitDisplayBuffer.EvaluateIn (context);
        PlayerSettings.iOS.showActivityIndicatorOnLoading = showActivityIndicatorOnLoading.EvaluateIn (context);

        UTPlayerSettingsExt extSettings = new UTPlayerSettingsExt();
        extSettings.MobileSplashScreen = mobileSplashScreen.EvaluateIn(context);
        extSettings.IPhoneHighResSplashScreen = highResIphone.EvaluateIn(context);
        extSettings.IPhoneTallHighResSplashScreen = highResIphoneTall.EvaluateIn(context);
        extSettings.IPadPortraitSplashScreen = iPadPortrait.EvaluateIn(context);
        extSettings.IPadLandscapeSplashScreen = iPadLandscape.EvaluateIn(context);
        extSettings.IPadHighResPortraitSplashScreen = highResIpadPortrait.EvaluateIn(context);
        extSettings.IPadHighResLandscapeSplashScreen = highResIpadLandscape.EvaluateIn(context);
        extSettings.Apply();

        PlayerSettings.iOS.prerenderedIcon = prerenderedIcon.EvaluateIn (context);

        PlayerSettings.bundleIdentifier = theBundleIdentifier;
        PlayerSettings.bundleVersion = theBundleVersion;

        PlayerSettings.iOS.targetDevice = targetDevice.EvaluateIn (context);
        #if UNITY_3_5
        PlayerSettings.iOS.targetPlatform = targetPlatform.EvaluateIn (context);
        #endif
        #if !UNITY_3_5
        PlayerSettings.targetGlesGraphics = targetGlesGraphics.EvaluateIn(context);
        #endif
        PlayerSettings.iOS.targetResolution = targetResolution.EvaluateIn (context);
        PlayerSettings.accelerometerFrequency = theFrequency;
        PlayerSettings.iOS.requiresPersistentWiFi = requiresPersistentWifi.EvaluateIn (context);
        PlayerSettings.iOS.exitOnSuspend = exitOnSuspend.EvaluateIn (context);

        PlayerSettings.apiCompatibilityLevel = apiCompatibilityLevel.EvaluateIn(context);
        PlayerSettings.aotOptions = aotCompilationOptions.EvaluateIn(context);
        PlayerSettings.iOS.sdkVersion = sdkVersion.EvaluateIn (context);
        PlayerSettings.iOS.targetOSVersion = targetOsVersion.EvaluateIn (context);
        PlayerSettings.iOS.scriptCallOptimization = scriptCallOptimizationLevel.EvaluateIn (context);
        PlayerSettings.stripUnusedMeshComponents = optimizeMeshData.EvaluateIn(context);
        #if UNITY_3_5
        PlayerSettings.debugUnloadMode = debugUnloadMode.EvaluateIn(context);
        #endif

        if (UTPreferences.DebugMode) {
            Debug.Log ("iOS player settings modified.", this);
        }

        yield return "";
    }
Пример #3
0
    public override IEnumerator Execute(UTContext context)
    {
        if (UTPreferences.DebugMode)
        {
            Debug.Log("Modifying iOS player settings.", this);
        }
        var theBundleIdentifier = bundleIdentifier.EvaluateIn(context);

        if (string.IsNullOrEmpty(theBundleIdentifier))
        {
            throw new UTFailBuildException("You need to specify the bundle identifier.", this);
        }

        var theBundleVersion = bundleVersion.EvaluateIn(context);

        if (string.IsNullOrEmpty(theBundleVersion))
        {
            throw new UTFailBuildException("You need to specify the bundle version.", this);
        }

        var theFrequency = accelerometerFrequency.EvaluateIn(context);

        if (theFrequency != 0 && theFrequency != 15 && theFrequency != 30 && theFrequency != 60 && theFrequency != 100)
        {
            throw new UTFailBuildException("Invalid accelerometer frequency. Valid values for accelerometer frequencies are 0, 15, 30, 60 and 100.", this);
        }

        PlayerSettings.defaultInterfaceOrientation        = defaultOrientation.EvaluateIn(context);
        PlayerSettings.statusBarHidden                    = statusBarHidden.EvaluateIn(context);
        PlayerSettings.iOS.statusBarStyle                 = statusBarStyle.EvaluateIn(context);
        PlayerSettings.use32BitDisplayBuffer              = use32BitDisplayBuffer.EvaluateIn(context);
        PlayerSettings.iOS.showActivityIndicatorOnLoading = showActivityIndicatorOnLoading.EvaluateIn(context);

        UTPlayerSettingsExt extSettings = new UTPlayerSettingsExt();

        extSettings.MobileSplashScreen               = mobileSplashScreen.EvaluateIn(context);
        extSettings.IPhoneHighResSplashScreen        = highResIphone.EvaluateIn(context);
        extSettings.IPhoneTallHighResSplashScreen    = highResIphoneTall.EvaluateIn(context);
        extSettings.IPadPortraitSplashScreen         = iPadPortrait.EvaluateIn(context);
        extSettings.IPadLandscapeSplashScreen        = iPadLandscape.EvaluateIn(context);
        extSettings.IPadHighResPortraitSplashScreen  = highResIpadPortrait.EvaluateIn(context);
        extSettings.IPadHighResLandscapeSplashScreen = highResIpadLandscape.EvaluateIn(context);
        extSettings.Apply();

        PlayerSettings.iOS.prerenderedIcon = prerenderedIcon.EvaluateIn(context);


        PlayerSettings.bundleIdentifier = theBundleIdentifier;
        PlayerSettings.bundleVersion    = theBundleVersion;

        PlayerSettings.iOS.targetDevice = targetDevice.EvaluateIn(context);
#if UNITY_3_5
        PlayerSettings.iOS.targetPlatform = targetPlatform.EvaluateIn(context);
#endif
#if !UNITY_3_5
        PlayerSettings.targetGlesGraphics = targetGlesGraphics.EvaluateIn(context);
#endif
        //PlayerSettings.iOS.targetResolution = targetResolution.EvaluateIn (context);
        PlayerSettings.accelerometerFrequency     = theFrequency;
        PlayerSettings.iOS.requiresPersistentWiFi = requiresPersistentWifi.EvaluateIn(context);
        PlayerSettings.iOS.exitOnSuspend          = exitOnSuspend.EvaluateIn(context);

        PlayerSettings.apiCompatibilityLevel      = apiCompatibilityLevel.EvaluateIn(context);
        PlayerSettings.aotOptions                 = aotCompilationOptions.EvaluateIn(context);
        PlayerSettings.iOS.sdkVersion             = sdkVersion.EvaluateIn(context);
        PlayerSettings.iOS.targetOSVersion        = targetOsVersion.EvaluateIn(context);
        PlayerSettings.iOS.scriptCallOptimization = scriptCallOptimizationLevel.EvaluateIn(context);
        PlayerSettings.stripUnusedMeshComponents  = optimizeMeshData.EvaluateIn(context);
#if UNITY_3_5
        PlayerSettings.debugUnloadMode = debugUnloadMode.EvaluateIn(context);
#endif

        if (UTPreferences.DebugMode)
        {
            Debug.Log("iOS player settings modified.", this);
        }

        yield return("");
    }
    public override IEnumerator Execute(UTContext context)
    {
        if (UTPreferences.DebugMode)
        {
            Debug.Log("Modifying Android player settings.", this);
        }
        var theBundleIdentifier = bundleIdentifier.EvaluateIn(context);

        if (string.IsNullOrEmpty(theBundleIdentifier))
        {
            throw new UTFailBuildException("You need to specify the bundle identifier.", this);
        }

        var theBundleVersion = bundleVersion.EvaluateIn(context);

        if (string.IsNullOrEmpty(theBundleVersion))
        {
            throw new UTFailBuildException("You need to specify the bundle version.", this);
        }

        var theKeyStore = keyStore.EvaluateIn(context);

        if (!string.IsNullOrEmpty(theKeyStore) && !File.Exists(theKeyStore))
        {
            throw new UTFailBuildException("The specified keystore does not exist.", this);
        }

        PlayerSettings.defaultInterfaceOrientation            = defaultOrientation.EvaluateIn(context);
        PlayerSettings.statusBarHidden                        = statusBarHidden.EvaluateIn(context);
        PlayerSettings.use32BitDisplayBuffer                  = use32BitDisplayBuffer.EvaluateIn(context);
        PlayerSettings.Android.use24BitDepthBuffer            = use24BitDepthBuffer.EvaluateIn(context);
        PlayerSettings.Android.showActivityIndicatorOnLoading = showActivityIndicatorOnLoading.EvaluateIn(context);

        UTPlayerSettingsExt extPlayerSettings = new UTPlayerSettingsExt();

        extPlayerSettings.MobileSplashScreen = mobileSplashScreen.EvaluateIn(context);
        extPlayerSettings.Apply();
        PlayerSettings.Android.splashScreenScale = splashScaling.EvaluateIn(context);

        PlayerSettings.bundleIdentifier          = theBundleIdentifier;
        PlayerSettings.bundleVersion             = theBundleVersion;
        PlayerSettings.Android.bundleVersionCode = bundleVersionCode.EvaluateIn(context);
        PlayerSettings.Android.minSdkVersion     = minimumApiLevel.EvaluateIn(context);

        PlayerSettings.Android.targetDevice = targetDevice.EvaluateIn(context);
#if UNITY_3_5
        PlayerSettings.Android.targetGraphics = targetGraphics.EvaluateIn(context);
#endif
#if !UNITY_3_5
        PlayerSettings.targetGlesGraphics = targetGlesGraphics.EvaluateIn(context);
#endif
        PlayerSettings.Android.preferredInstallLocation = installLocation.EvaluateIn(context);
        PlayerSettings.Android.forceInternetPermission  = forceInternetPermission.EvaluateIn(context);
        PlayerSettings.Android.forceSDCardPermission    = forceSDCardPermission.EvaluateIn(context);

        PlayerSettings.apiCompatibilityLevel     = apiCompatibilityLevel.EvaluateIn(context);
        PlayerSettings.stripUnusedMeshComponents = optimizeMeshData.EvaluateIn(context);
#if UNITY_3_5
        PlayerSettings.debugUnloadMode = debugUnloadMode.EvaluateIn(context);
#endif

        PlayerSettings.Android.keystoreName = theKeyStore;
        PlayerSettings.Android.keystorePass = keyStorePassword.EvaluateIn(context);

        PlayerSettings.Android.keyaliasName = keyAlias.EvaluateIn(context);
        PlayerSettings.Android.keyaliasPass = keyPassword.EvaluateIn(context);

        if (UTPreferences.DebugMode)
        {
            Debug.Log("Android player settings modified.", this);
        }

        yield return("");
    }