Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Handles.DrawWireCude draws cube in wrong position

Discussion in 'Editor & General Support' started by zhutianlun810, Oct 17, 2019.

  1. zhutianlun810

    zhutianlun810

    Joined:
    Sep 17, 2017
    Posts:
    165
    Hello,

    I am facing a very weird bug. I am using Handles.DrawWireCube to draw cube on the scene. However, it always draw a cube in the top left corner.

    I used a breakpoint to debug it. Everything is correct. Even I tried to use OnDrawGizmos, it works fine. I feel that the cube is drawed in UI space. How can I draw it in world space?

    Thanks
     

    Attached Files:

    Last edited: Oct 17, 2019