using UnityEngine;
using ORKFramework;
using ORKFramework.Formulas;
using System.Collections.Generic;
namespace ORKFramework.Formulas.Steps
{
[ORKEditorHelp("Print Value", "Send current value to debug console", "")]
[ORKNodeInfo("Value")]
public class PrintValueStep : BaseFormulaStep
{
// variable and player prefs
[ORKEditorHelp("Console Text", "What to print to the console before the value.", "")]
[ORKEditorInfo(expandWidth = true)]
[ORKEditorLayout("type", ParameterType.String, endCheckGroup = true)]
public string stringValue = "";
public PrintValueStep()
{
}
public override int Calculate(FormulaCall call)
{
ValueHelper.UseOperator(ref call.result, 0, FormulaOperator.Add);
Debug.Log(stringValue + " Custom Value: " + call.result);
return this.next;
}
/*============================================================================
Name functions
============================================================================*/
public override string GetNodeDetails()
{
return "";
//return this.formulaOperator.ToString() + " " + this.value.GetInfoText();
}
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
[ORKEditorLayout("type", ParameterType.String, endCheckGroup = true)]
ORKEditorLayout attribute is for hiding settings based on other settings :)If you're enjoying my products, updates and support, please consider supporting me on patreon.com!