From 1a3ff95ff324c7abb4b6616b67a0513eef47ed01 Mon Sep 17 00:00:00 2001 From: Mateusz Szczygielski Date: Wed, 7 Feb 2024 16:20:30 +0100 Subject: [PATCH] Fix onLidarModelChange invocation --- Assets/RGLUnityPlugin/Scripts/LidarSensor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/RGLUnityPlugin/Scripts/LidarSensor.cs b/Assets/RGLUnityPlugin/Scripts/LidarSensor.cs index dc01753ba..e29e15d09 100644 --- a/Assets/RGLUnityPlugin/Scripts/LidarSensor.cs +++ b/Assets/RGLUnityPlugin/Scripts/LidarSensor.cs @@ -160,6 +160,7 @@ public void OnValidate() } ApplyConfiguration(configuration); validatedPreset = modelPreset; + onLidarModelChange?.Invoke(); } private void ApplyConfiguration(BaseLidarConfiguration newConfig) @@ -169,8 +170,6 @@ private void ApplyConfiguration(BaseLidarConfiguration newConfig) return; } - onLidarModelChange?.Invoke(); - rglGraphLidar.UpdateNodeRaysFromMat3x4f(lidarRaysNodeId, newConfig.GetRayPoses()) .UpdateNodeRaysSetRange(lidarRangeNodeId, newConfig.GetRayRanges()) .UpdateNodeRaysSetRingIds(lidarRingsNodeId, newConfig.GetRayRingIds())