using Unity.Entities;
using UnityEngine;

namespace Common
{
    class TDPrefabsAuthoring : MonoBehaviour
    {
        // public GameObject PrefabController;
        public GameObject PrefabCharacter;
    
        public class TdPrefabsAuthoringBaker : Baker<TDPrefabsAuthoring>
        {
            public override void Bake(TDPrefabsAuthoring authoring)
            {
                var entity = GetEntity(TransformUsageFlags.None);
                AddComponent(entity, new TdPrefabs()
                {
                    Character  = GetEntity(authoring.PrefabCharacter, TransformUsageFlags.Dynamic),
                    // Controller = GetEntity(authoring.PrefabController, TransformUsageFlags.Dynamic)
                });
            }
        }
    }
}


