Exemple #1
0
        static public GameObject Spawn(GameObject ObjectClass, MyMonoBehaviour ParentComponent, UnityAction <GameObject> Initializer = null)
        {
            Assert.IsNotNull(ParentComponent);

            return(Spawn(ObjectClass, ParentComponent.gameObject, Initializer));
        }
Exemple #2
0
        // These functions allow us to spawn GameObjects using an optional delegate for initialization prior to Awake and Start being called
        static public T Spawn <T>(T ComponentClass, MyMonoBehaviour ParentComponent, UnityAction <T> Initializer = null) where T : MyMonoBehaviour
        {
            Assert.IsNotNull(ParentComponent);

            return(Spawn(ComponentClass, ParentComponent.gameObject, Initializer));
        }