Protfolio-Emanuel-Polsky / Assets / _Project / Code / PathFinding / Mono / PathfindLayerMono.cs
PathfindLayerMono.cs
Raw
using Unity.Burst;
using Unity.Entities;
using UnityEngine;

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