Skip to content

Commit ba41cac

Browse files
author
krzysztof biernat
committed
Change ReferenceVariable 'where' constraint
1 parent 16f6128 commit ba41cac

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

Runtime/Variables/IContainValue.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

Runtime/Variables/IContainValue.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/Variables/ReferenceVariable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
namespace GTVariable
99
{
1010
[System.Serializable]
11-
public class ReferenceVariable<T, ScriptableObject> where ScriptableObject : IContainValue<T>
11+
public class ReferenceVariable<T, VariableType> where VariableType : Variable<T>
1212
{
1313
[SerializeField]
1414
private bool useConstant = true;
1515
[SerializeField]
1616
private T constantValue;
1717
[SerializeField]
18-
private ScriptableObject variable;
18+
private VariableType variable;
1919

2020
public T Value
2121
{

Runtime/Variables/Variable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace GTVariable
1010
{
1111
[System.Serializable]
12-
public class Variable<T> : ScriptableObject, IContainValue<T>
12+
public class Variable<T> : ScriptableObject
1313
{
1414
public T value;
1515
public UnityEvent onValueChange;

0 commit comments

Comments
 (0)