From 6904be2f6703bc2be48343818e61694108d6235a Mon Sep 17 00:00:00 2001 From: vkovec Date: Fri, 13 Jan 2023 09:54:31 -0500 Subject: [PATCH] FBX-450 update obsolete function (#689) * test update in test * update other function as well --- com.unity.formats.fbx/Tests/FbxTests/ModelExporterTest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/com.unity.formats.fbx/Tests/FbxTests/ModelExporterTest.cs b/com.unity.formats.fbx/Tests/FbxTests/ModelExporterTest.cs index 7369358c6..534f6edc5 100644 --- a/com.unity.formats.fbx/Tests/FbxTests/ModelExporterTest.cs +++ b/com.unity.formats.fbx/Tests/FbxTests/ModelExporterTest.cs @@ -88,9 +88,17 @@ public void TestBasics() var character = new GameObject(); var smr = character.AddComponent(); smr.sharedMesh = cube.GetComponent().sharedMesh; +#if UNITY_2023_1_OR_NEWER + var meshCount = Object.FindObjectsByType(FindObjectsSortMode.None).Length; +#else // UNITY_2023_1_OR_NEWER var meshCount = Object.FindObjectsOfType().Length; +#endif // UNITY_2023_1_OR_NEWER ModelExporter.ExportObject(GetRandomFbxFilePath(), character); +#if UNITY_2023_1_OR_NEWER + Assert.AreEqual(meshCount, Object.FindObjectsByType(FindObjectsSortMode.None).Length); +#else // UNITY_2023_1_OR_NEWER Assert.AreEqual(meshCount, Object.FindObjectsOfType().Length); +#endif // UNITY_2023_1_OR_NEWER } // Test euler to quaternion conversion