Skip to content
Snippets Groups Projects
Commit 2414a3f4 authored by Erik Johnson's avatar Erik Johnson
Browse files

Merge branch 'issue/16-implicit-operator-overrides' into 'master'

Merge Request for Issue/16 - implicit override

Closes #16

See merge request !8
parents e58acc74 ac4bff6a
No related branches found
No related tags found
1 merge request!8Merge Request for Issue/16 - implicit override
......@@ -21,6 +21,14 @@ namespace Shared.ScriptableVariables {
public delegate void ValueChangeHandler();
public event ValueChangeHandler OnValueChanged;
//---------------------------------------------------------------------------
public static implicit operator T(ScriptableVariable<T> sv) {
if (sv != null) {
return sv.Value;
}
return default;
}
//---------------------------------------------------------------------------
public T Value {
get { return value; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment