You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migration fails on Unity 7 text assets: %UNITY directive before %YAML is read as binary #1
Error:
[LightSide] 85 migration error(s) occurred while updating to media.lightside.core 4.4.0, media.lightside.unitext 3.30.0. ...
System.IO.IOException: [LightSide] Migration coverage is incomplete: 'Assets/.../BootstrapConfig.asset' could not be inspected.
---> System.IO.InvalidDataException: The source has neither a Unity YAML header nor supported native binary metadata (format 774900261).
at LightSide.ProjectYamlFiles.InspectNativeMetadata(...) in Editor/Migration/ProjectYamlFiles.cs:line 183
at LightSide.ProjectYamlFiles.ReadSource(...) in Editor/Migration/ProjectYamlFiles.cs:line 159
at LightSide.MigrationIndex.b__0(ScanTarget target) in Editor/Migration/MigrationIndex.cs:line 443
Cause:
Unity 7 writes a format directive line above the YAML header in text assets.
Suggested fix (I’m running it locally as a patch, and migration then completes):
/// Unity 7 writes a %UNITY format directive on the line before it.
static bool OpensYamlDirective(Stream stream)
{
Span header = stackalloc byte[32];
int read = 0, step;
while (read < header.Length && (step = stream.Read(header.Slice(read))) > 0) read += step;
ReadOnlySpan<byte> text = header.Slice(0, read);
if (read >= 3 && header[0] == 0xEF && header[1] == 0xBB && header[2] == 0xBF) text = text.Slice(3);
if (StartsWith(text, "%UNITY "))
{
var newline = text.IndexOf((byte)'\n');
if (newline < 0) return false;
text = text.Slice(newline + 1);
}
return StartsWith(text, "%YAML");
}
static bool StartsWith(ReadOnlySpan bytes, string ascii)
{
if (bytes.Length < ascii.Length) return false;
for (int i = 0; i < ascii.Length; i++)
if (bytes[i] != ascii[i]) return false;
return true;
}
Steps to reproduce
Try migration on the Unity 7
Logs
Screenshots, video or a minimal project
No response
Before submitting
I searched existing issues and this is not a duplicate.
I removed access tokens and registry URLs from everything I pasted or attached.
Activity