Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MeachWare on February 11, 2014, 09:42:20 AM

Title: Debug Log type INFO [PATCHED]
Post by: MeachWare on February 11, 2014, 09:42:20 AM
Is not displaying anything in the console. I have to set all my Debug Logs to type WARNING. Is this a known issue or is it a setting somewhere? I would like to start filtering my Console output.

Thanks
Title: Re: Debug Log type INFO
Post by: MeachWare on February 11, 2014, 01:16:09 PM
Update: WARNING and ERROR are working but INFO is still not.

(http://1.bp.blogspot.com/-a39VU3uWiu0/UvpopB-5TVI/AAAAAAAAAFc/Y0xPh4gGBe4/s1600/DebugLog-NoInfo.png)
Title: Re: Debug Log type INFO
Post by: jeanfabre on February 11, 2014, 01:18:53 PM
Hi,

 Playmaker has its own console, open it from the playmaker menu/EditorWindows/LogWindow

Or, you can forward all playmaker console logs to Unity console Logs in the PlayMaker preferences.


bye,

 Jean
Title: Re: Debug Log type INFO
Post by: MeachWare on February 11, 2014, 02:02:27 PM
Original polite reply was lost after another attachment forum crash....  >:( >:( >:(

The PlayMaker log is not what I want to see, plus I have to dig through my scene and FIND the GO I want to see AND the log disappears after you stop running UNLIKE the Unity Console...

Here's my fix - works great for my needs.
Edit: IF I can ever get the whopping 808 BYTE file....

File:
Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
// (c) Revised MeachWare 2014

using 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();
}
}
}