From 3483e1b7abd5fde8e6179345e2824d357bf24646 Mon Sep 17 00:00:00 2001 From: Edwin Zaniar Putra Date: Mon, 10 Feb 2025 17:22:53 +0700 Subject: [PATCH] Handle file name with comma. --- Editor/BuildLayout.cs | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Editor/BuildLayout.cs b/Editor/BuildLayout.cs index c047b38..9dc8eb1 100644 --- a/Editor/BuildLayout.cs +++ b/Editor/BuildLayout.cs @@ -578,8 +578,33 @@ List ReadCommaSeparatedStrings(ref int index) bundlesLine = bundlesLine.Trim(); var bundles = new List(); - foreach (var b in bundlesLine.Split(new[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries)) - bundles.Add(b.Trim()); + if (bundlesLine.StartsWith("Assets/") || bundlesLine.StartsWith("Resources/") || bundlesLine.StartsWith("Packages/")) + { + foreach (var b in bundlesLine.Split(new[] { ", Ass", ", Res", ", Pac" }, System.StringSplitOptions.RemoveEmptyEntries)) + { + if (b.StartsWith("ets/")) + { + bundles.Add("Ass" + b.Trim()); + } + else if (b.StartsWith("ources/")) + { + bundles.Add("Res" + b.Trim()); + } + else if (b.StartsWith("kages/")) + { + bundles.Add("Pac" + b.Trim()); + } + else + { + bundles.Add(b.Trim()); + } + } + } + else + { + foreach (var b in bundlesLine.Split(new[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries)) + bundles.Add(b.Trim()); + } bundles.Sort(); return bundles;