using GarmentButton.Culling; using Unity.Entities; using UnityEngine; namespace GarmentButton.VerletIntegration.Render { [RequireComponent(typeof(BakePoints))] public class MaterialFlagMono : MonoBehaviour { public Material material; } public class MaterialFlagMonoBaker : Baker { public override void Bake(MaterialFlagMono authoring) { //Create entity var entity = GetEntity(TransformUsageFlags.None); AddComponent(entity, new MaterialFlag { Value = authoring.material, }); AddComponent(entity); SetComponentEnabled(entity,true); } } public struct MaterialFlag : IComponentData { public UnityObjectRef Value; } [UpdateInGroup(typeof(InitializationSystemGroup))] public partial class VerletIntegrationRenderGroupSystems : ComponentSystemGroup { } }