using UnityEngine; namespace UnityAtoms { public static class VariableUtils { public static V RuntimeCreate(bool createChangedEvent = true, bool createChangedWithHistoryEvent = false) where V : ScriptableObjectVariable where E1 : GameEvent where E2 : GameEvent { var sov = ScriptableObject.CreateInstance(); sov.Changed = createChangedEvent ? ScriptableObject.CreateInstance() : null; sov.ChangedWithHistory = createChangedWithHistoryEvent ? ScriptableObject.CreateInstance() : null; return sov; } } }