Join our Discord Channel
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.// (c) Revised MeachWare 2014using UnityEngine;namespace HutongGames.PlayMaker.Actions{ [ActionCategory(ActionCategory.Debug)] [Tooltip("Sends a message to the Unity Console.")] public class DebugConsole : FsmStateAction { [Tooltip("Info, Warning, or Error.")] public LogLevel logLevel; [Tooltip("Text to print to the Unity Console.")] public FsmString text; public override void Reset() { logLevel = LogLevel.Info; text = ""; } public override void OnEnter() { if (string.IsNullOrEmpty(text.Value)) Finish(); if (logLevel == LogLevel.Info) Debug.Log(text); if (logLevel == LogLevel.Warning) Debug.LogWarning(text); if (logLevel == LogLevel.Error) Debug.LogError(text); Finish(); } }}