diff --git a/Assets/Fungus/Flowchart/Editor/VariableEditor.cs b/Assets/Fungus/Flowchart/Editor/VariableEditor.cs index 89002e3c..322fad88 100644 --- a/Assets/Fungus/Flowchart/Editor/VariableEditor.cs +++ b/Assets/Fungus/Flowchart/Editor/VariableEditor.cs @@ -62,8 +62,10 @@ namespace Fungus // variable references to be set to null when inspected. When this condition // occurs we just skip displaying the property for this frame. if (selectedVariable != null && - selectedVariable.gameObject != flowchart.gameObject) + selectedVariable.gameObject != flowchart.gameObject && + selectedVariable.scope == VariableScope.Private) { + property.objectReferenceValue = null; return; }