Skip to content

Commit 90f8630

Browse files
claudetyevco
authored andcommitted
Fix type inference in Physics sample for CI builds
Use explicit Entity type declarations instead of var to help compiler type inference in CI environments where source generator timing may cause tuple type inference to fail.
1 parent 8291c08 commit 90f8630

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/KeenEyes.Sample.Physics/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void RunRaycastingDemo()
293293
var targets = new List<(Entity entity, string name, Vector3 position)>();
294294

295295
// Target 1: Directly ahead
296-
var target1 = world.Spawn()
296+
Entity target1 = world.Spawn()
297297
.With(new Transform3D(new Vector3(10, 2, 0), Quaternion.Identity, Vector3.One))
298298
.With(RigidBody.Static())
299299
.With(PhysicsShape.Sphere(1.0f))
@@ -302,7 +302,7 @@ void RunRaycastingDemo()
302302
targets.Add((target1, "Target A (ahead)", new Vector3(10, 2, 0)));
303303

304304
// Target 2: To the right
305-
var target2 = world.Spawn()
305+
Entity target2 = world.Spawn()
306306
.With(new Transform3D(new Vector3(5, 2, 5), Quaternion.Identity, Vector3.One))
307307
.With(RigidBody.Static())
308308
.With(PhysicsShape.Box(1, 1, 1))
@@ -311,7 +311,7 @@ void RunRaycastingDemo()
311311
targets.Add((target2, "Target B (right)", new Vector3(5, 2, 5)));
312312

313313
// Target 3: Above
314-
var target3 = world.Spawn()
314+
Entity target3 = world.Spawn()
315315
.With(new Transform3D(new Vector3(0, 8, 0), Quaternion.Identity, Vector3.One))
316316
.With(RigidBody.Static())
317317
.With(PhysicsShape.Sphere(0.5f))

0 commit comments

Comments
 (0)