Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class VariableReference<TBase, TScriptableVariable> where TScriptableVariable : ScriptableObjectVariable<TBase>
- {
- [SerializeField] private bool useConstant;
- [SerializeField] private TBase constantValue;
- [SerializeField] private TScriptableVariable variable;
- public TBase Value => useConstant ? constantValue : variable.value;
- }
- [Serializable]
- public class FloatReference : VariableReference<float,FloatVariable>
- {
- }
- public class TestBehaviour : MonoBehaviour
- {
- public FloatReference floatRef;
- private void Start()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement