Skip to content

Commit

Permalink
Fix for Issue #1021 - PhysicsProcessor ParentScene may be initialized…
Browse files Browse the repository at this point in the history
… to null (#2262)

* Added new assignment for parentScene in PhysicsProcessor

* Update PhysicsProcessor.cs

* Update PhysicsProcessor.cs

* Update PhysicsProcessor.cs

Moved parentScene assignment to RenderColliderShapes.

* Update PhysicsProcessor.cs

---------

Co-authored-by: dloe <dylanloe@gmail.com>
  • Loading branch information
wrshield and dloe authored May 31, 2024
1 parent 419b964 commit e1b9c47
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sources/engine/Stride.Physics/Engine/PhysicsProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ internal void RenderColliderShapes(bool enabled)
}
}

// Assign parentScene
parentScene ??= Services.GetSafeServiceAs<SceneSystem>().SceneInstance.RootScene;

debugScene.Parent = parentScene;
}
}
Expand Down

0 comments on commit e1b9c47

Please sign in to comment.