From a64f64d582f5460037cb8fff3a8658ed0eed5052 Mon Sep 17 00:00:00 2001 From: neuecc Date: Tue, 16 Jan 2024 14:32:53 +0900 Subject: [PATCH] if TOOL --- .../addons/R3.Godot/ObservableTrackerRuntimeHook.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/R3.Godot/addons/R3.Godot/ObservableTrackerRuntimeHook.cs b/src/R3.Godot/addons/R3.Godot/ObservableTrackerRuntimeHook.cs index 476ba95a..ff6c88c2 100644 --- a/src/R3.Godot/addons/R3.Godot/ObservableTrackerRuntimeHook.cs +++ b/src/R3.Godot/addons/R3.Godot/ObservableTrackerRuntimeHook.cs @@ -1,4 +1,5 @@ -#nullable enable + +#nullable enable using Godot; using System; @@ -12,6 +13,7 @@ public partial class ObservableTrackerRuntimeHook : Node { public override void _Ready() { +#if TOOLS EngineDebugger.RegisterMessageCapture(ObservableTrackerDebuggerPlugin.MessageHeader, Callable.From((string message, GDArray data) => { //GD.Print(nameof(ObservableTrackerRuntimeHook) + " received " + message); @@ -44,10 +46,13 @@ public override void _Ready() } return true; })); +#endif } public override void _ExitTree() { +#if TOOLS EngineDebugger.UnregisterMessageCapture(ObservableTrackerDebuggerPlugin.MessageHeader); +#endif } }