namespace UnityAtoms { public abstract class ScriptableObjectReference where E1 : GameEvent where E2 : GameEvent where V : ScriptableObjectVariable { public bool UseConstant = true; public T ConstantValue; public V Variable; public ScriptableObjectReference() { } public ScriptableObjectReference(T value) { UseConstant = true; ConstantValue = value; } public T Value { get { return UseConstant ? ConstantValue : Variable.Value; } } public static implicit operator T(ScriptableObjectReference reference) { return reference.Value; } } }