Quellcode durchsuchen

[unity] Fix cloning MeshAttachment nonessential fields.

John vor 8 Jahren
Ursprung
Commit
14b61672a0

+ 1 - 1
spine-unity/Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs

@@ -715,7 +715,7 @@ namespace Spine.Unity.Modules.AttachmentTools {
 				ma.hulllength = o.hulllength;
 
 				// Nonessential.
-				ma.Edges = o.Edges.Clone() as int[];
+				ma.Edges = (o.Edges == null) ? null : o.Edges.Clone() as int[]; // Allow absence of Edges array when nonessential data is not exported.
 				ma.Width = o.Width;
 				ma.Height = o.Height;
 			}