From a111c9aec57af9b9570e86022cffd2d297b9c394 Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 25 Feb 2022 16:20:20 -0500 Subject: [PATCH] Fixed Reference Error --- NewHorizons/Utility/DebugRaycaster.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NewHorizons/Utility/DebugRaycaster.cs b/NewHorizons/Utility/DebugRaycaster.cs index 2394a914..4cfde913 100644 --- a/NewHorizons/Utility/DebugRaycaster.cs +++ b/NewHorizons/Utility/DebugRaycaster.cs @@ -32,7 +32,8 @@ namespace NewHorizons.Utility if (Physics.Raycast(origin, direction, out RaycastHit hitInfo, 100f, layerMask)) { var pos = hitInfo.transform.InverseTransformPoint(hitInfo.point); - Logger.Log($"Raycast hit {{\"x\": {pos.x}, \"y\": {pos.y}, \"z\": {pos.z}}} on [{hitInfo.transform.gameObject.name}] at [{GetPath(hitInfo.transform.gameObject)}]"); + var o = hitInfo.transform.gameObject; + Logger.Log($"Raycast hit {{\"x\": {pos.x}, \"y\": {pos.y}, \"z\": {pos.z}}} on [{o.name}] at [{SearchUtilities.GetPath(o)}]"); } _rb.EnableCollisionDetection(); }