|
|
@ -121,10 +121,14 @@ namespace Fungus |
|
|
|
{ |
|
|
|
{ |
|
|
|
return _globalStaicRef; |
|
|
|
return _globalStaicRef; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else if(Application.isPlaying) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return _globalStaicRef = FungusManager.Instance.GlobalVariables.GetOrAddVariable(Key, value, this.GetType()); |
|
|
|
return _globalStaicRef = FungusManager.Instance.GlobalVariables.GetOrAddVariable(Key, value, this.GetType()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -133,7 +137,7 @@ namespace Fungus |
|
|
|
{ |
|
|
|
{ |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (scope != VariableScope.Global) |
|
|
|
if (scope != VariableScope.Global || !Application.isPlaying) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return this.value; |
|
|
|
return this.value; |
|
|
|
} |
|
|
|
} |
|
|
@ -144,7 +148,7 @@ namespace Fungus |
|
|
|
} |
|
|
|
} |
|
|
|
set |
|
|
|
set |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (scope != VariableScope.Global) |
|
|
|
if (scope != VariableScope.Global || !Application.isPlaying) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.value = value; |
|
|
|
this.value = value; |
|
|
|
} |
|
|
|
} |
|
|
|