From 405c9f3334ae8b73d33b92538b2cb1ce12054e21 Mon Sep 17 00:00:00 2001 From: Alexandre Foucher Date: Mon, 23 Sep 2024 16:29:31 +0200 Subject: [PATCH] Fixing Lidar performance issue --- .../Scripts/Sensors/LiDAR/RaycastLiDAR/RaycastLiDARSensor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/UnitySensors/Runtime/Scripts/Sensors/LiDAR/RaycastLiDAR/RaycastLiDARSensor.cs b/Assets/UnitySensors/Runtime/Scripts/Sensors/LiDAR/RaycastLiDAR/RaycastLiDARSensor.cs index 64711e79..2cfa5764 100644 --- a/Assets/UnitySensors/Runtime/Scripts/Sensors/LiDAR/RaycastLiDAR/RaycastLiDARSensor.cs +++ b/Assets/UnitySensors/Runtime/Scripts/Sensors/LiDAR/RaycastLiDAR/RaycastLiDARSensor.cs @@ -91,7 +91,7 @@ protected override void UpdateSensor() JobHandle updateRaycastCommandsJobHandle = _updateRaycastCommandsJob.Schedule(pointsNum, 1); JobHandle updateGaussianNoisesJobHandle = _updateGaussianNoisesJob.Schedule(pointsNum, 1, updateRaycastCommandsJobHandle); - JobHandle raycastJobHandle = RaycastCommand.ScheduleBatch(_raycastCommands, _raycastHits, pointsNum, updateGaussianNoisesJobHandle); + JobHandle raycastJobHandle = RaycastCommand.ScheduleBatch(_raycastCommands, _raycastHits, 256, updateGaussianNoisesJobHandle); _jobHandle = _raycastHitsToPointsJob.Schedule(pointsNum, 1, raycastJobHandle); JobHandle.ScheduleBatchedJobs();