unity-atoms/Source/Base/SetVariableValue.cs
Soraphis 42ef1682c0 Removed event generic parameters from ScriptableObjectReference
- they are not needed and hinder the implementation if a type does not have events
2019-05-04 11:49:35 +02:00

26 lines
636 B
C#

using UnityEngine;
using UnityEngine.Serialization;
namespace UnityAtoms
{
public abstract class SetVariableValue<T, V, R, E1, E2> : VoidAction
where E1 : GameEvent<T>
where E2 : GameEvent<T, T>
where V : ScriptableObjectVariable<T, E1, E2>
where R : ScriptableObjectReference<T, V>
{
[FormerlySerializedAs("Variable")]
[SerializeField]
private V _variable = null;
[FormerlySerializedAs("Value")]
[SerializeField]
private R _value = null;
public override void Do()
{
_variable.Value = _value.Value;
}
}
}