using System.Collections; using System.Collections.Generic; using UnityEngine; namespace GameplayIngredients { public class CallableFlow : MonoBehaviour { [SerializeField] private List callables = new List(); public void AddCallable() where T:Callable { var callable = gameObject.AddComponent(); Callable.SetAsFlowComponent(callable, true); } private void OnDestroy() { if (callables == null) return; foreach(var callable in callables) { Destroy(callable); } } } }