From 8d3d23e371891ccf310f572d9bb0d60f100681df Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Wed, 14 Jan 2015 13:28:51 +0000 Subject: [PATCH] Change #65 Substitute variables in Debug Log command --- Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs b/Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs index 9d10d443..5b9e3450 100644 --- a/Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs +++ b/Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs @@ -21,16 +21,19 @@ namespace Fungus public override void OnEnter () { + FungusScript fungusScript = GetFungusScript(); + string message = fungusScript.SubstituteVariables(logMessage.Value); + switch (logType) { case DebugLogType.Info: - Debug.Log(logMessage.Value); + Debug.Log(message); break; case DebugLogType.Warning: - Debug.LogWarning(logMessage.Value); + Debug.LogWarning(message); break; case DebugLogType.Error: - Debug.LogError(logMessage.Value); + Debug.LogError(message); break; }