Files
beyond/Assets/ThirdParty/PlayMaker/Actions/Debug/DebugLog.cs
2024-11-20 15:21:28 +01:00

32 lines
707 B
C#

// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Debug)]
[Tooltip("Sends a log message to the PlayMaker Log Window.")]
public class DebugLog : BaseLogAction
{
[Tooltip("Info, Warning, or Error.")]
public LogLevel logLevel;
[Tooltip("Text to send to the log.")]
public FsmString text;
public override void Reset()
{
logLevel = LogLevel.Info;
text = "";
base.Reset();
}
public override void OnEnter()
{
if (!string.IsNullOrEmpty(text.Value))
{
ActionHelpers.DebugLog(Fsm, logLevel, text.Value, sendToUnityLog);
}
Finish();
}
}
}