From 91b5ad7de7d6f77d29275fc69d3e7506df6a586f Mon Sep 17 00:00:00 2001 From: Amir Ebrahimi Date: Tue, 25 Aug 2020 02:11:10 -0700 Subject: [PATCH] fix(tests): compile errors on 2018.4.26f1 (#38) --- Tests/Editor/MeshUtilsTest.cs | 4 ++++ .../Whinarn.UnityMeshSimplifier.Editor.Tests.asmdef | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Tests/Editor/MeshUtilsTest.cs b/Tests/Editor/MeshUtilsTest.cs index c13e2c2..4e44eb2 100644 --- a/Tests/Editor/MeshUtilsTest.cs +++ b/Tests/Editor/MeshUtilsTest.cs @@ -412,7 +412,11 @@ public void ShouldGetMeshUVs() mesh.vertices = new Vector3[4]; for (int i = 0; i < uvs.Length; i++) { +#if UNITY_2018 + mesh.SetUVs(i, uvs[i].ToList()); +#else mesh.SetUVs(i, uvs[i]); +#endif } var allUVs = MeshUtils.GetMeshUVs(mesh); diff --git a/Tests/Editor/Whinarn.UnityMeshSimplifier.Editor.Tests.asmdef b/Tests/Editor/Whinarn.UnityMeshSimplifier.Editor.Tests.asmdef index 1da497b..a38422d 100644 --- a/Tests/Editor/Whinarn.UnityMeshSimplifier.Editor.Tests.asmdef +++ b/Tests/Editor/Whinarn.UnityMeshSimplifier.Editor.Tests.asmdef @@ -1,7 +1,10 @@ { "name": "Whinarn.UnityMeshSimplifier.Editor.Tests", "references": [ - "GUID:77ccaf49895b0d64e87cd4b4faf83c49" + "Whinarn.UnityMeshSimplifier.Runtime" + ], + "optionalUnityReferences": [ + "TestAssemblies" ], "includePlatforms": [ "Editor" @@ -11,7 +14,5 @@ "overrideReferences": false, "precompiledReferences": [], "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false + "defineConstraints": [] } \ No newline at end of file