using System.Collections.Generic; using NUnit.Framework; using Sirenix.Utilities; using UnityEditor; using UnityEngine; using VOID.Generic.Objects.Wearable; namespace Test.EditMode.Prefabs.Generic { public class WearableObjectTest { private List _gameObjects = new(); [OneTimeSetUp] public void Setup() { AssetDatabase.FindAssets($"t:{nameof(GameObject)}").ForEach(gameObjectGuid => { var gameObjectPath = AssetDatabase.GUIDToAssetPath(gameObjectGuid); var gameObject = AssetDatabase.LoadAssetAtPath(gameObjectPath); var wearableObjects = gameObject.GetComponentsInChildren(); // If prefab have any ArmorObject - take it, we will test it if (wearableObjects.Length > 0) _gameObjects.Add(gameObject); }); } [OneTimeTearDown] public void Cleanup() { _gameObjects?.Clear(); _gameObjects = null; } [Test] public void NothingToTest() { } } }