ECS/Unity/UnityEntityManager.cs
/// <summary>
/// Instantiates Entity and GameObject with it's Components from Prefab!
/// </summary>
Instantiates Entity and GameObject with it's Components from Prefab!
Instantiates Entity and GameObject with it ' s Components from Prefab!
public GameObject InstantiateWithGameObject(GameObject prefab, Vector3 position, Quaternion rotation, Transform parent) {
            Entity entity = CreateEntity();
            GameObject gameObject = UnityEngine.Object.Instantiate(prefab, position, rotation, parent);
            gameObject.GetComponent<GameObjectEntity>().SetEntity(entity, this);
            return gameObject;
        }
public GameObject InstantiateWithGameObject ( GameObject prefab , Vector3 position , Quaternion rotation , Transform parent ) { Entity entity = CreateEntity ( ) ; GameObject gameObject = UnityEngine . Object . Instantiate ( prefab , position , rotation , parent ) ; gameObject . GetComponent < GameObjectEntity > ( ) . SetEntity ( entity , this ) ; return gameObject ; }
Instantiates Entity and GameObject with it's Components from Prefab!
Instantiates Entity and GameObject with it ' s Components from Prefab!
prefab
GameObject
position
Vector3
rotation
Quaternion
parent
Transform