diff --git a/Assets/YooAsset/Editor/Assembly/MacroProcessor.cs b/Assets/YooAsset/Editor/Assembly/MacroProcessor.cs index 989030ec..e9039038 100644 --- a/Assets/YooAsset/Editor/Assembly/MacroProcessor.cs +++ b/Assets/YooAsset/Editor/Assembly/MacroProcessor.cs @@ -27,12 +27,11 @@ namespace YooAsset.Editor var writerSettings = new XmlWriterSettings { Indent = true, - Encoding = Encoding.UTF8, + Encoding = new UTF8Encoding(false), //ć— BOM OmitXmlDeclaration = false }; - using (var streamWriter = new StreamWriter(memoryStream, Encoding.UTF8)) - using (var xmlWriter = XmlWriter.Create(streamWriter, writerSettings)) + using (var xmlWriter = XmlWriter.Create(memoryStream, writerSettings)) { xmlDoc.Save(xmlWriter); }