From 1c11c49cae96a5354cc05c33d5acc8e5a9e185ad Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 12 Mar 2024 00:57:02 -0400 Subject: [PATCH] Destroy whole game object --- NewHorizons/Components/Volumes/StreamingWarpVolume.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Components/Volumes/StreamingWarpVolume.cs b/NewHorizons/Components/Volumes/StreamingWarpVolume.cs index cfce0c08..163a9e78 100644 --- a/NewHorizons/Components/Volumes/StreamingWarpVolume.cs +++ b/NewHorizons/Components/Volumes/StreamingWarpVolume.cs @@ -31,14 +31,14 @@ namespace NewHorizons.Components.Volumes if (_probe == null) { NHLogger.LogError($"How is your scout probe null? Destroying {nameof(StreamingWarpVolume)}"); - Component.DestroyImmediate(this); + GameObject.DestroyImmediate(gameObject); } } if (streamingGroup == null) { NHLogger.LogError($"{nameof(StreamingWarpVolume)} has no streaming group. Destroying {nameof(StreamingWarpVolume)}"); - Component.DestroyImmediate(this); + GameObject.DestroyImmediate(gameObject); } bool probeActive = _probe.IsLaunched() && !_probe.IsAnchored();