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())