From c0d1575f3336abf73618b640fd6792e2b977cc76 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 29 Mar 2016 16:18:17 +0100 Subject: [PATCH] Added comment for new SetVariable method. --- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index f47ca04e..00b9b64a 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -651,6 +651,10 @@ namespace Fungus return null; } + /** + * Register a new variable with the Flowchart at runtime. + * The variable should be added as a component on the Flowchart game object. + */ public void SetVariable(string key, T newvariable) where T : Variable { foreach (Variable v in variables) @@ -665,6 +669,7 @@ namespace Fungus } } } + Debug.LogWarning("Variable " + key + " not found."); }