Search Unity

Display Colliders in Editor Pure ECS

Discussion in 'Physics for ECS' started by Silloty, Feb 27, 2020.

  1. Silloty

    Silloty

    Joined:
    Jan 8, 2018
    Posts:
    21
  2. Yuriy_Sevastyanov

    Yuriy_Sevastyanov

    Joined:
    Apr 9, 2017
    Posts:
    25
    I think you can
    1. Create Empty GameObject on the scene, add DOTS->Physics->PhysicsDebugDisplay component and check Convert To Entity option
    2. Create new entity, add PhysicsDebugDisplayData component (I didn't check this option)
     
    fantasicle0, racer161 and Silloty like this.
  3. Silloty

    Silloty

    Joined:
    Jan 8, 2018
    Posts:
    21
    Thanks for the hint
    This is kind of working if you are adding the following to the PhysicsDebugDisplayData
    Code (CSharp):
    1. World.EntityManager.SetComponentData(entity,new PhysicsDebugDisplayData {
    2.             DrawBroadphase = 0,
    3.             DrawColliders = 0,
    4.             DrawColliderAabbs = 0,
    5.             DrawColliderEdges = 1
    6.         });
    I'm saying kind of working, because when you are trying to display 2 colliders, nothing is display, but when you are trying for one it's working perfectly fine. Any idea why ?