public void CreateDifferentSingletons()
        {
            MonoBehaviour singletonA = DummySingletonA.GetOrCreateInstance();
            MonoBehaviour singletonB = DummySingletonB.GetOrCreateInstance();

            Assert.IsNotNull(singletonA);
            Assert.IsNotNull(singletonB);
            Assert.AreNotEqual(singletonA, singletonB);
        }
        public IEnumerator AddSingletonByAwake()
        {
            DummySingletonB singleton = new GameObject("TrueSingleton").AddComponent <DummySingletonB>();

            yield return(null);

            DummySingletonB secondSingleton = DummySingletonB.GetOrCreateInstance();

            DummySingletonB thirdSingleton = new GameObject("FakeSingleton").AddComponent <DummySingletonB>();

            yield return(null);

            Assert.IsNotNull(singleton);
            Assert.IsNotNull(secondSingleton);
            Assert.IsNull(thirdSingleton);
            Assert.AreEqual(singleton, secondSingleton);
        }