using Unity.Burst; using Unity.Entities; using UnityEngine; namespace GarmentButton.PathFinding { [BurstCompile] public class PathfindLayerMono : MonoBehaviour { public GroundType GroundType; } public class PathfindLayerMonoBaker : Baker { public override void Bake(PathfindLayerMono authoring) { //Create entity var entity = GetEntity(TransformUsageFlags.None); AddComponent(entity, new SurfaceType { Value = authoring.GroundType, }); } } }