/// <summary> /// Android設定複寫 /// </summary> private void OverrideSetAndroid() { SDAndroidSet aTmpSet = mShowSetInfo.AndroidSet; // Resolution and Presentation PlayerSettings.use32BitDisplayBuffer = aTmpSet.Use32BitDisplayBuffer; PlayerSettings.Android.disableDepthAndStencilBuffers = aTmpSet.disableDepthAndStencilBuffers; PlayerSettings.Android.showActivityIndicatorOnLoading = aTmpSet.ShowActivityIndicatorOnLoading; // Identification PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, aTmpSet.BundleIDAndroid); PlayerSettings.Android.bundleVersionCode = aTmpSet.BundleCode; PlayerSettings.Android.minSdkVersion = aTmpSet.SdkVersions; // Configuration PlayerSettings.SetApiCompatibilityLevel(BuildTargetGroup.Android, aTmpSet.ApiCompatibilityLevel); PlayerSettings.Android.forceInternetPermission = aTmpSet.ForceInternet; PlayerSettings.Android.forceSDCardPermission = aTmpSet.ForceSDCard; PlayerSettings.Android.targetDevice = aTmpSet.TargetDevice; // Publishing Settings PlayerSettings.Android.keystoreName = string.Format("{0}/{1}", Application.dataPath, aTmpSet.KeyStorePath); PlayerSettings.Android.keystorePass = aTmpSet.KeyStorePassword; PlayerSettings.Android.keyaliasName = aTmpSet.KeyAlialsName; PlayerSettings.Android.keyaliasPass = aTmpSet.KeyAlialsPassword; // Scripting Define Symbols PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, aTmpSet.ScriptDefineSymblos); // Icon if (aTmpSet.IconSetStatus) { if (aTmpSet.IconOverride) { SDDataMove.SetIconsGroup(BuildTargetGroup.Android, aTmpSet.DefIcons); } else { SDDataMove.ClearnIconsGroup(BuildTargetGroup.Android); } } // Splash Image if (aTmpSet.SplashSetStatus) { SDDataMove.SetSplashScreen("androidSplashScreen", mShowSetInfo.AndroidSet.SplashImage); PlayerSettings.Android.splashScreenScale = aTmpSet.SplashScreenScale; } //---------------------------------------- // Unity5 New PlayerSettings.SetGraphicsAPIs(BuildTarget.Android, aTmpSet.GraphicsType); }
/// <summary> /// IOS設定複寫 /// </summary> private void OverrideSetIOS() { SDIOSSet aTmpSet = mShowSetInfo.IOSSet; // Resolution and Presentation PlayerSettings.iOS.requiresFullScreen = aTmpSet.RequiresFullScreen; PlayerSettings.statusBarHidden = aTmpSet.StatusBarHidden; PlayerSettings.iOS.statusBarStyle = aTmpSet.StatusBarStyle; PlayerSettings.iOS.showActivityIndicatorOnLoading = aTmpSet.ShowActivityIndicatorOnLoading; // Debugging and crash reporting PlayerSettings.actionOnDotNetUnhandledException = aTmpSet.ActionOnDotNetUnhandledException; PlayerSettings.logObjCUncaughtExceptions = aTmpSet.LogObjCUncaughtExceptions; PlayerSettings.enableCrashReportAPI = aTmpSet.EnableCrashReportAPI; // Identification PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, aTmpSet.BundleIDIOS); PlayerSettings.iOS.buildNumber = aTmpSet.BuildNumber; PlayerSettings.iOS.appleEnableAutomaticSigning = aTmpSet.AppleEnableAutomaticSigning; PlayerSettings.iOS.appleDeveloperTeamID = aTmpSet.AppleDeveloperTeamID; PlayerSettings.iOS.iOSManualProvisioningProfileID = aTmpSet.ProvisioningProfileID; // Configuration PlayerSettings.SetScriptingBackend(BuildTargetGroup.iOS, aTmpSet.ScriptingBackend); PlayerSettings.SetApiCompatibilityLevel(BuildTargetGroup.iOS, aTmpSet.ApiCompatibilityLevel); PlayerSettings.iOS.targetDevice = aTmpSet.TargetDevice; PlayerSettings.iOS.sdkVersion = aTmpSet.SDKVersion; PlayerSettings.iOS.targetOSVersionString = aTmpSet.TargetOSVersionString; SDDataMove.SetBoolPalyerSetting("Prepare IOS For Recording", aTmpSet.PrepareIOSForRecording); PlayerSettings.iOS.requiresPersistentWiFi = aTmpSet.RequiresPersistentWiFi; PlayerSettings.iOS.appInBackgroundBehavior = aTmpSet.AppInBackgroundBehavior; if (mShowSetInfo.IOSSet.ScriptingBackend == ScriptingImplementation.IL2CPP && mShowSetInfo.IOSSet.SDKVersion == iOSSdkVersion.DeviceSDK) { PlayerSettings.SetArchitecture(BuildTargetGroup.iOS, aTmpSet.Architecture); } // Optimization PlayerSettings.iOS.scriptCallOptimization = aTmpSet.ScriptCallOptimizationLevel; if (aTmpSet.ScriptingBackend == ScriptingImplementation.IL2CPP) { PlayerSettings.stripEngineCode = aTmpSet.StripEngineCode; } else if (aTmpSet.ScriptingBackend == ScriptingImplementation.Mono2x) { PlayerSettings.strippingLevel = aTmpSet.StripLevel; } // Scripting Define Symbols PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, aTmpSet.ScriptDefineSymblos); // Icon if (aTmpSet.IconSetStatus) { if (aTmpSet.IconOverride) { SDDataMove.SetIconsGroup(BuildTargetGroup.iOS, aTmpSet.DefIcons); } else { SDDataMove.ClearnIconsGroup(BuildTargetGroup.iOS); } } PlayerSettings.iOS.prerenderedIcon = aTmpSet.PrerenderedIcon; // Splash if (aTmpSet.SplashSetStatus) { for (int i = 0; i < mShowSetInfo.IOSSet.SplashImages.Length; i++) { SDDataMove.SetSplashScreen((eMobileSplashScreen)i, mShowSetInfo.IOSSet.SplashImages[i]); } } //---------------------------------------- // Unity5 New PlayerSettings.SetGraphicsAPIs(BuildTarget.iOS, aTmpSet.GraphicsType); }