IndieGame/client/Packages/com.unity.ugui@1.0.0/Tests/Editor/TestBehaviourBase.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

21 lines
413 B
C#

using NUnit.Framework;
using UnityEngine;
public class TestBehaviourBase<T> where T : Behaviour
{
protected T m_TestObject;
[SetUp]
public virtual void TestSetup()
{
var gameObject = new GameObject();
m_TestObject = gameObject.AddComponent<T>();
}
[TearDown]
public virtual void Teardown()
{
GameObject.DestroyImmediate(m_TestObject.gameObject);
}
}