File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,14 @@ private static void BuildIOS(String path, bool isReleaseBuild)
371371 EditorUserBuildSettings . iOSBuildConfigType = iOSBuildType . Release ;
372372 #endif
373373
374+ #if UNITY_2022_1_OR_NEWER
375+ PlayerSettings . SetIl2CppCompilerConfiguration ( BuildTargetGroup . iOS , isReleaseBuild ? Il2CppCompilerConfiguration . Release : Il2CppCompilerConfiguration . Debug ) ;
376+ PlayerSettings . SetIl2CppCodeGeneration ( UnityEditor . Build . NamedBuildTarget . iOS , UnityEditor . Build . Il2CppCodeGeneration . OptimizeSize ) ;
377+ #elif UNITY_2020_3_OR_NEWER
378+ PlayerSettings . SetIl2CppCompilerConfiguration ( BuildTargetGroup . iOS , isReleaseBuild ? Il2CppCompilerConfiguration . Release : Il2CppCompilerConfiguration . Debug ) ;
379+ EditorUserBuildSettings . il2CppCodeGeneration = UnityEditor . Build . Il2CppCodeGeneration . OptimizeSize ;
380+ #endif
381+
374382 var playerOptions = new BuildPlayerOptions
375383 {
376384 scenes = GetEnabledScenes ( ) ,
You can’t perform that action at this time.
0 commit comments