diff --git a/com.unity.toon-graphics-test/Runtime/Resources.meta b/com.unity.toon-graphics-test/Runtime/Resources.meta new file mode 100644 index 000000000..9d44b9c8f --- /dev/null +++ b/com.unity.toon-graphics-test/Runtime/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 754917e9a31b4fe42839fa2993e1589d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.toon-graphics-test/Runtime/UTSGraphicsSettings.asset b/com.unity.toon-graphics-test/Runtime/Resources/UTSGraphicsSettings.asset similarity index 100% rename from com.unity.toon-graphics-test/Runtime/UTSGraphicsSettings.asset rename to com.unity.toon-graphics-test/Runtime/Resources/UTSGraphicsSettings.asset diff --git a/com.unity.toon-graphics-test/Runtime/UTSGraphicsSettings.asset.meta b/com.unity.toon-graphics-test/Runtime/Resources/UTSGraphicsSettings.asset.meta similarity index 100% rename from com.unity.toon-graphics-test/Runtime/UTSGraphicsSettings.asset.meta rename to com.unity.toon-graphics-test/Runtime/Resources/UTSGraphicsSettings.asset.meta diff --git a/com.unity.toon-graphics-test/Runtime/UTSGraphicsTests.cs b/com.unity.toon-graphics-test/Runtime/UTSGraphicsTests.cs index b864a4515..8153e0be6 100644 --- a/com.unity.toon-graphics-test/Runtime/UTSGraphicsTests.cs +++ b/com.unity.toon-graphics-test/Runtime/UTSGraphicsTests.cs @@ -84,12 +84,11 @@ internal static IEnumerator RunInternal(GraphicsTestCase testCase, bool isXR = f yield return null; Camera mainCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent(); - UTSGraphicsTestSettings settings = Object.FindFirstObjectByType(); - Assert.IsNotNull(settings, "Invalid test scene, couldn't find UTS_GraphicsTestSettings"); - - UTSGraphicsTestSettingsSO settingsSO = settings.SO; - Assert.IsNotNull(settingsSO); - + + //"Packages/com.unity.toon-graphics-test/Runtime/Resources/UTSGraphicsSettings.asset"; + UTSGraphicsTestSettingsSO settingsSO = Resources.Load("UTSGraphicsSettings"); + Assert.IsNotNull(settingsSO, "[UTS Graphics Test] Settings not found"); + ImageComparisonSettings imageComparisonSettings = settingsSO.ImageComparisonSettings; Assert.IsNotNull(imageComparisonSettings); @@ -117,23 +116,13 @@ internal static IEnumerator RunInternal(GraphicsTestCase testCase, bool isXR = f ImageAssert.AreEqual(testCase.ReferenceImage, mainCamera, imageComparisonSettings, testCase.ReferenceImagePathLog); - - // Does it allocate memory when it renders what's on the main camera? - bool allocatesMemory = false; - - if (settings == null || settings.CheckMemoryAllocation) - { - try - { - ImageAssert.AllocatesMemory(mainCamera, imageComparisonSettings); - } - catch (AssertionException) - { - allocatesMemory = true; - } - if (allocatesMemory) - Assert.Fail("Allocated memory when rendering what is on main camera"); - } + + // [TODO-sin: 2025-12-23] Check memory allocations + // try { + // ImageAssert.AllocatesMemory(mainCamera, imageComparisonSettings); + // } catch (AssertionException) { + // Assert.Fail("Allocated memory when rendering what is on main camera"); + // } } }