Skip to content

Commit 4442fe6

Browse files
committed
[change] Made it possible to initialize DepthBufferLiDARSensor later so that it works with the built app.
1 parent e0dc02a commit 4442fe6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Assets/UnitySensors/Runtime/Scripts/Sensors/LiDAR/DepthBufferLiDAR/DepthBufferLiDARSensor.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ public class DepthBufferLiDARSensor : LiDARSensor
3838

3939
protected override void Init()
4040
{
41-
base.Init();
41+
if (scanPattern == null)
42+
{
43+
return;
44+
}
45+
Initialize();
46+
}
47+
48+
public override void Initialize()
49+
{
50+
base.Initialize();
4251
_transform = this.transform;
4352
SetupCamera();
4453
LoadScanData();

0 commit comments

Comments
 (0)