Exemplo n.º 1
0
        T RegisterUnityObject <T>(T uobject, DestructionBy destructionBy = DestructionBy.Fixture)
            where T : UnityObject
        {
            if (destructionBy == DestructionBy.Fixture)
            {
                m_ObjectsDestroyedByFixture.Add(new ObjectAndName {
                    obj = uobject, name = uobject.name
                });
            }
            else if (destructionBy == DestructionBy.Test)
            {
                m_ObjectsDestroyedByTest.Add(uobject);
            }

            return(uobject);
        }
Exemplo n.º 2
0
 protected GameObject CreateGameObject(DestructionBy destructionBy)
 => CreateGameObject(null, destructionBy);
Exemplo n.º 3
0
 protected GameObject CreateGameObject(string name, DestructionBy destructionBy, params Type[] components) =>
 RegisterUnityObject(new GameObject(MakeName(name ?? "go"), components), destructionBy);