Destroy whole game object

This commit is contained in:
Nick 2024-03-12 00:57:02 -04:00
parent e8b0bf4a6b
commit 1c11c49cae

View File

@ -31,14 +31,14 @@ namespace NewHorizons.Components.Volumes
if (_probe == null) if (_probe == null)
{ {
NHLogger.LogError($"How is your scout probe null? Destroying {nameof(StreamingWarpVolume)}"); NHLogger.LogError($"How is your scout probe null? Destroying {nameof(StreamingWarpVolume)}");
Component.DestroyImmediate(this); GameObject.DestroyImmediate(gameObject);
} }
} }
if (streamingGroup == null) if (streamingGroup == null)
{ {
NHLogger.LogError($"{nameof(StreamingWarpVolume)} has no streaming group. Destroying {nameof(StreamingWarpVolume)}"); NHLogger.LogError($"{nameof(StreamingWarpVolume)} has no streaming group. Destroying {nameof(StreamingWarpVolume)}");
Component.DestroyImmediate(this); GameObject.DestroyImmediate(gameObject);
} }
bool probeActive = _probe.IsLaunched() && !_probe.IsAnchored(); bool probeActive = _probe.IsLaunched() && !_probe.IsAnchored();