Skip to content
Permalink
Browse files

[Physics] Add comment for PhysicsShapesRenderingService creation

  • Loading branch information
xen2 committed Jan 12, 2019
1 parent b54f35a commit 94cb4b1c490ee4fdcce94b29e34f1fc9509dea23
Showing with 2 additions and 3 deletions.
  1. +2 −3 sources/engine/Xenko.Physics/Engine/PhysicsProcessor.cs
@@ -167,9 +167,8 @@ protected override void OnSystemAdd()

((IReferencable)physicsSystem).AddReference();

var graphicsDeviceService = Services.GetServiceAs<Graphics.IGraphicsDeviceService>();
debugShapeRendering = Services.GetService<PhysicsShapesRenderingService>();
if (graphicsDeviceService != null && debugShapeRendering == null)
// Check if PhysicsShapesRenderingService is created (and check if rendering is enabled with IGraphicsDeviceService)
if (Services.GetService<Graphics.IGraphicsDeviceService>() != null && Services.GetService<PhysicsShapesRenderingService>() == null)
{
debugShapeRendering = new PhysicsShapesRenderingService(Services);
var gameSystems = Services.GetSafeServiceAs<IGameSystemCollection>();

0 comments on commit 94cb4b1

Please sign in to comment.
You can’t perform that action at this time.