[unity] Fixed a build error when prefab is referenced. See commit c2cbdc57. See #1273,#1931.

This commit is contained in:
Harald Csaszar 2021-08-05 17:17:15 +02:00
parent ac86ef9ce8
commit bf70a62f1b

View File

@ -114,6 +114,7 @@ namespace Spine.Unity.Editor {
var mesh = meshFilter.sharedMesh;
string meshName = string.Format("Skeleton Prefab Mesh \"{0}\"", renderer.name);
mesh.name = meshName;
mesh.hideFlags = HideFlags.DontSaveInEditor; // removed flag DontSaveInBuild, prevents a build error when the prefab is referenced
context.AddObjectToAsset(meshName, mesh);
}
}