Browse Source

Change #65 Substitute variables in Debug Log command

master
chrisgregan 10 years ago
parent
commit
8d3d23e371
  1. 9
      Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs

9
Assets/Fungus/FungusScript/Scripts/Commands/DebugLog.cs

@ -21,16 +21,19 @@ namespace Fungus
public override void OnEnter () public override void OnEnter ()
{ {
FungusScript fungusScript = GetFungusScript();
string message = fungusScript.SubstituteVariables(logMessage.Value);
switch (logType) switch (logType)
{ {
case DebugLogType.Info: case DebugLogType.Info:
Debug.Log(logMessage.Value); Debug.Log(message);
break; break;
case DebugLogType.Warning: case DebugLogType.Warning:
Debug.LogWarning(logMessage.Value); Debug.LogWarning(message);
break; break;
case DebugLogType.Error: case DebugLogType.Error:
Debug.LogError(logMessage.Value); Debug.LogError(message);
break; break;
} }

Loading…
Cancel
Save