don't duplicate uv array

This commit is contained in:
in0finite 2019-10-17 19:40:06 +02:00
parent cd6210d2cc
commit 29bffc2c11
2 changed files with 5 additions and 5 deletions

View file

@ -296,7 +296,7 @@ namespace SanAndreasUnity.Importing.Conversion
if (src.TexCoords != null && src.TexCoords.Length > 0)
{
mesh.uv = Utilities.F.ConvertArray( src.TexCoords[0], x => Types.Convert(x) );
mesh.uv = src.TexCoords[0];
}
// ReSharper restore ConvertClosureToMethodGroup

View file

@ -58,7 +58,7 @@ namespace SanAndreasUnity.Importing.RenderWareStream
public readonly float Specular;
public readonly UnityEngine.Color32[] Colours;
public readonly Vector2[][] TexCoords;
public readonly UnityEngine.Vector2[][] TexCoords;
public readonly FaceInfo[] Faces;
public readonly BoundingSphere BoundingSphere;
@ -105,13 +105,13 @@ namespace SanAndreasUnity.Importing.RenderWareStream
if ((Flags & (GeometryFlag.TexCoords | GeometryFlag.TexCoords2)) != 0)
{
TexCoords = new Vector2[uvCount][];
TexCoords = new UnityEngine.Vector2[uvCount][];
for (var j = 0; j < uvCount; ++j)
{
var uvs = TexCoords[j] = new Vector2[VertexCount];
var uvs = TexCoords[j] = new UnityEngine.Vector2[VertexCount];
for (var i = 0; i < VertexCount; ++i)
{
uvs[i] = new Vector2(reader);
uvs[i] = Conversion.Types.Convert(new Vector2(reader));
}
}
}