Search Unity

Question Debug Draw Line in DOTS [Solved]

Discussion in 'Entity Component System' started by toomasio, Nov 17, 2020.

  1. toomasio

    toomasio

    Joined:
    Nov 19, 2013
    Posts:
    199
    Hello,

    Just wondering if there are any easy functions or examples to draw a debug line and other shapes in DOTS?
    Can't seem to find anything except the DebugStream class but not sure how to use it.

    Anyone have any examples?

    Thanks,
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Debug.DrawLine\DrawRay works without problems in jobs (even with Burst) only thing you should know is the size of preallocated on unity side buffer for these lines, but you can change it (with performance cost) through command-line arguments:
    debug-line-buffer-size N
     
    Krajca, WAYNGames, toomasio and 2 others like this.
  3. Krajca

    Krajca

    Joined:
    May 6, 2014
    Posts:
    347
    Check dots physics samples. I saw debug lines there.
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780