@@ -110,8 +110,12 @@ public static void Build(string[] args)
110110break ;
111111}
112112case BuildTarget . StandaloneOSX :
113+ #if UNITY_2021_2_OR_NEWER
114+ PlayerSettings . SetScriptingBackend ( NamedBuildTarget . Standalone , ScriptingImplementation . Mono2x ) ;
115+ #else
113116PlayerSettings . SetScriptingBackend ( BuildTargetGroup . Standalone , ScriptingImplementation . Mono2x ) ;
114- break ;
117+ #endif
118+ break ;
115119case BuildTarget . WebGL :
116120#if UNITY_2021_2_OR_NEWER
117121// Use ASTC texture compression, since we are also targeting mobile versions - Don't use this for desktop only targets
@@ -228,7 +232,7 @@ private static void SetGraphicsApi(string[] tagParameters)
228232if ( tagParameters . Contains ( "webgl1" ) )
229233{
230234#if ! UNITY_2023_1_OR_NEWER
231- graphicsAPIs . Add ( GraphicsDeviceType . OpenGLES2 ) ;
235+ graphicsAPIs . Add ( GraphicsDeviceType . OpenGLES2 ) ;
232236#else
233237LogWarning ( "WebGL1 not supported anymore, choosing WebGL2 instead" ) ;
234238graphicsAPIs . Add ( GraphicsDeviceType . OpenGLES3 ) ;
@@ -391,10 +395,31 @@ private static void Build(BuildTarget buildTarget, string filePath)
391395var webBuild = WebBuildReportList . Instance . GetBuild ( buildSummary . outputPath ) ;
392396
393397var settings = StrippingProjectSettings . ActiveSettings ;
398+ Log ( $ "Using stripping settings { settings . name } with modules to strip: { string . Join ( ", " , settings . SubmodulesToStrip ) } ") ;
394399var successfulStripping = WebBuildProcessor . StripBuild ( webBuild , settings ) ;
395400if ( successfulStripping )
396401{
397402Log ( "The build was stripped successfully." ) ;
403+ string functionsJsonPath = Path . Combine ( buildSummary . outputPath , "Build" , "functions.json" ) ;
404+ if ( File . Exists ( functionsJsonPath ) )
405+ {
406+ File . Delete ( functionsJsonPath ) ;
407+ Log ( $ "Deleted functions.json at { functionsJsonPath } ") ;
408+ }
409+ else
410+ {
411+ LogWarning ( $ "Could not find file to delete: { functionsJsonPath } ") ;
412+ }
413+ string labelsJsonPath = Path . Combine ( buildSummary . outputPath , "Build" , "labels.json" ) ;
414+ if ( File . Exists ( labelsJsonPath ) )
415+ {
416+ File . Delete ( labelsJsonPath ) ;
417+ Log ( $ "Deleted labels.json at { labelsJsonPath } ") ;
418+ }
419+ else
420+ {
421+ LogWarning ( $ "Could not find file to delete: { labelsJsonPath } ") ;
422+ }
398423}
399424else
400425{
0 commit comments