Author Topic: Writing debug output to txt file  (Read 652 times)


  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Writing debug output to txt file
« on: September 16, 2016, 11:17:36 AM »

I am using a visual scripting language (playmaker) to continuously track distance between two objects and save those values in a float variable. Now I want to debug that float variable and output the debug log to a txt file. Could someone help me in doing so?

(please keep in mind I am a n00b and have no prior coding experience :) )

Code: [Select]

namespace HutongGames.PlayMaker.Actions
[Tooltip("Logs the value of a Float Variable in the PlayMaker Log Window.")]
public class DebugFloat : BaseLogAction
        [Tooltip("Info, Warning, or Error.")]
        public LogLevel logLevel;

        [Tooltip("The Float variable to debug.")]
public FsmFloat floatVariable;

public override void Reset()
logLevel = LogLevel.Info;
floatVariable = null;

public override void OnEnter()
string text = "None";

if (!floatVariable.IsNone)
text = floatVariable.Name + ": " + floatVariable.Value;

ActionHelpers.DebugLog(Fsm, logLevel, text, sendToUnityLog);


If possible can someone tell me where I need to insert what code exactly for this to work?

Many thanks!!


  • Administrator
  • Hero Member
  • *****
  • Posts: 4956
    • View Profile
    • jinxtergames
Re: Writing debug output to txt file
« Reply #1 on: September 18, 2016, 04:51:46 AM »
Maybe this can help you.

You can use the "Debug Float" Action and "Check" Send to unity log.