43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
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<GameObject> _gameObjects = new();
|
|
|
|
[OneTimeSetUp]
|
|
public void Setup()
|
|
{
|
|
AssetDatabase.FindAssets($"t:{nameof(GameObject)}").ForEach(gameObjectGuid =>
|
|
{
|
|
var gameObjectPath = AssetDatabase.GUIDToAssetPath(gameObjectGuid);
|
|
var gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(gameObjectPath);
|
|
var wearableObjects = gameObject.GetComponentsInChildren<WearableObject>();
|
|
|
|
// 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()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
|