From 97da432c35b8c7aaf9dd2c39e2aa4b1f55f36065 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 27 Jan 2021 16:15:06 +0800 Subject: +behaviour designer --- .../Runtime/Basic Tasks/Debug/LogValue.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Client/Assets/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs') diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs new file mode 100644 index 00000000..73605da8 --- /dev/null +++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs @@ -0,0 +1,24 @@ +using UnityEngine; + +namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityDebug +{ + [TaskCategory("Basic/Debug")] + [TaskDescription("Log a variable value.")] + public class LogValue : Action + { + [Tooltip("The variable to output")] + public SharedGenericVariable variable; + + public override TaskStatus OnUpdate() + { + Debug.Log(variable.Value.value.GetValue()); + + return TaskStatus.Success; + } + + public override void OnReset() + { + variable = null; + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0