using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Gamestrap { public abstract class ComponentModifier : Modifier where T : Component { public T Component { get; set; } public override void Apply(GameObject target) { Component = target.GetComponent(); if (!Component) { Component = target.AddComponent(); } if (Component) Apply(Component); } public abstract void Apply(T component); } }