/// <summary> /// 預設IOS資料(取現在的PlayerSetting) /// </summary> private void DefaultSetIOS() { SDIOSSet aTmpSet = new SDIOSSet(); // Resolution and Presentation aTmpSet.RequiresFullScreen = PlayerSettings.iOS.requiresFullScreen; aTmpSet.StatusBarHidden = PlayerSettings.statusBarHidden; aTmpSet.StatusBarStyle = PlayerSettings.iOS.statusBarStyle; aTmpSet.ShowActivityIndicatorOnLoading = PlayerSettings.iOS.showActivityIndicatorOnLoading; // Debugging and crash reporting aTmpSet.ActionOnDotNetUnhandledException = PlayerSettings.actionOnDotNetUnhandledException; aTmpSet.LogObjCUncaughtExceptions = PlayerSettings.logObjCUncaughtExceptions; aTmpSet.EnableCrashReportAPI = PlayerSettings.enableCrashReportAPI; // Identification aTmpSet.BundleIDIOS = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.iOS); aTmpSet.BuildNumber = PlayerSettings.iOS.buildNumber; aTmpSet.AppleEnableAutomaticSigning = PlayerSettings.iOS.appleEnableAutomaticSigning; aTmpSet.AppleDeveloperTeamID = PlayerSettings.iOS.appleDeveloperTeamID; aTmpSet.ProvisioningProfileID = PlayerSettings.iOS.iOSManualProvisioningProfileID; // Configuration aTmpSet.ScriptingBackend = PlayerSettings.GetScriptingBackend(BuildTargetGroup.iOS); aTmpSet.ApiCompatibilityLevel = PlayerSettings.GetApiCompatibilityLevel(BuildTargetGroup.iOS); aTmpSet.TargetDevice = PlayerSettings.iOS.targetDevice; aTmpSet.SDKVersion = PlayerSettings.iOS.sdkVersion; aTmpSet.TargetOSVersionString = PlayerSettings.iOS.targetOSVersionString; aTmpSet.PrepareIOSForRecording = SDDataMove.GetBoolPlayerSetting("Prepare IOS For Recording"); aTmpSet.RequiresPersistentWiFi = PlayerSettings.iOS.requiresPersistentWiFi; aTmpSet.AppInBackgroundBehavior = PlayerSettings.iOS.appInBackgroundBehavior; aTmpSet.Architecture = PlayerSettings.GetArchitecture(BuildTargetGroup.iOS); // Optimization aTmpSet.ScriptCallOptimizationLevel = PlayerSettings.iOS.scriptCallOptimization; aTmpSet.StripEngineCode = PlayerSettings.stripEngineCode; aTmpSet.StripLevel = PlayerSettings.strippingLevel; // Scripting Define Symbols aTmpSet.ScriptDefineSymblos = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS); // Icon aTmpSet.IconOverride = true; SDDataMove.GetIconsGroup(BuildTargetGroup.iOS, ref mUIUseImages.IosIcons, ref aTmpSet.DefIcons); aTmpSet.PrerenderedIcon = PlayerSettings.iOS.prerenderedIcon; // Splash Images int aEmumTotal = Enum.GetNames(typeof(eMobileSplashScreen)).Length; mUIUseImages.IOSSplashImages = new Texture2D[aEmumTotal]; aTmpSet.SplashImages = new string[aEmumTotal]; for (int i = 0; i < aEmumTotal; i++) { aTmpSet.SplashImages[i] = SDDataMove.GetSplashScreenPath((eMobileSplashScreen)i, ref mUIUseImages.IOSSplashImages[i]); } //------------------------------------------------- // Unity5 New aTmpSet.GraphicsType = PlayerSettings.GetGraphicsAPIs(BuildTarget.iOS); // Set Down mShowSetInfo.IOSSet = aTmpSet; }
/// <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); }