Skip to content

Commit 1e57166

Browse files
committed
Change disable error handling to avoid big json files
1 parent 2f4d24a commit 1e57166

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

Assets/BuildSettings/DefaultSubmoduleStrippingSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ MonoBehaviour:
1414
m_EditorClassIdentifier:
1515
OptimizeCodeAfterStripping: 1
1616
RemoveEmbeddedDebugSymbols: 1
17-
MissingSubmoduleErrorHandling: 1
17+
MissingSubmoduleErrorHandling: 0
1818
SubmodulesToStrip:
1919
- Freetype2
2020
- IMGUI

Assets/Scripts/Editor/BuildScript.cs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -411,34 +411,12 @@ private static void Build(BuildTarget buildTarget, string filePath)
411411
settings.SubmodulesToStrip.Add("WebGL Support");
412412
}
413413

414-
Log($"Using stripping settings {settings.name} with modules to strip: {string.Join(", ", settings.SubmodulesToStrip)}");
414+
Log($"Using stripping settings {settings.name} with {settings.SubmodulesToStrip.Count} modules to strip: {string.Join(", ", settings.SubmodulesToStrip)}");
415415

416416
var successfulStripping = WebBuildProcessor.StripBuild(webBuild, settings);
417417
if (successfulStripping)
418418
{
419419
Log("The build was stripped successfully.");
420-
// Apparently the json files are read by unity,
421-
// it will work without them but the console is full of errors then
422-
/*string functionsJsonPath = Path.Combine(buildSummary.outputPath, "Build", "functions.json");
423-
if (File.Exists(functionsJsonPath))
424-
{
425-
File.Delete(functionsJsonPath);
426-
Log($"Deleted functions.json at {functionsJsonPath}");
427-
}
428-
else
429-
{
430-
LogWarning($"Could not find file to delete: {functionsJsonPath}");
431-
}
432-
string labelsJsonPath = Path.Combine(buildSummary.outputPath, "Build", "labels.json");
433-
if (File.Exists(labelsJsonPath))
434-
{
435-
File.Delete(labelsJsonPath);
436-
Log($"Deleted labels.json at {labelsJsonPath}");
437-
}
438-
else
439-
{
440-
LogWarning($"Could not find file to delete: {labelsJsonPath}");
441-
}*/
442420
}
443421
else
444422
{

ProjectSettings/Packages/com.unity.web.stripping-tool/Settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
1111
"key": "StrippingProjectSettings.ActiveSettings.AssetData",
12-
"value": "{\"m_Value\":\"{\\\"MonoBehaviour\\\":{\\\"m_Enabled\\\":true,\\\"m_EditorHideFlags\\\":0,\\\"m_Name\\\":\\\"DefaultSubmoduleStrippingSettings\\\",\\\"m_EditorClassIdentifier\\\":\\\"\\\",\\\"OptimizeCodeAfterStripping\\\":true,\\\"RemoveEmbeddedDebugSymbols\\\":true,\\\"MissingSubmoduleErrorHandling\\\":1,\\\"SubmodulesToStrip\\\":[\\\"2D Rendering\\\",\\\"Freetype2\\\",\\\"IMGUI\\\",\\\"System.Xml\\\",\\\"TetGen\\\",\\\"Text Rendering\\\",\\\"Texture Decompression BC\\\",\\\"Texture Decompression ETC\\\",\\\"Texture Decompression Crunch\\\",\\\"UI Toolkit\\\"]}}\"}"
12+
"value": "{\"m_Value\":\"{\\\"MonoBehaviour\\\":{\\\"m_Enabled\\\":true,\\\"m_EditorHideFlags\\\":0,\\\"m_Name\\\":\\\"DefaultSubmoduleStrippingSettings\\\",\\\"m_EditorClassIdentifier\\\":\\\"\\\",\\\"OptimizeCodeAfterStripping\\\":true,\\\"RemoveEmbeddedDebugSymbols\\\":true,\\\"MissingSubmoduleErrorHandling\\\":0,\\\"SubmodulesToStrip\\\":[\\\"2D Rendering\\\",\\\"Freetype2\\\",\\\"IMGUI\\\",\\\"System.Xml\\\",\\\"TetGen\\\",\\\"Text Rendering\\\",\\\"Texture Decompression BC\\\",\\\"Texture Decompression ETC\\\",\\\"Texture Decompression Crunch\\\",\\\"UI Toolkit\\\"]}}\"}"
1313
},
1414
{
1515
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",

0 commit comments

Comments
 (0)