- Home /
Draw in Worldspace without creating a gameObject?
I have a GameObject that keeps an array of a Objects. Those Objects are very small and lightweight, carying only a 'position'(vector3) and a few details important for my game, and I need a lot of them preferable. However I want to test their positions. So far i have done that by just using Debug.DrawLine, to show where they are, but it is not visible ingame, and I would like to be able to. I really don't want to instantiate a lot of GameObjects that carry a small texture.
Is it possible to draw a small texture or rect that represent them so that I can see them Ingame or at least draw them to my cameras view so that it appears where they are supposed to?
Answer by donutLaserDev · Aug 21, 2018 at 09:26 AM
If it is not neccessary to see them in the build, only in the Editor, you can enable the Gizmos in the Game view and then the lines drawn by the Debug.DrawLine will be visible.
Your answer
![](https://koobas.hobune.stream/wayback/20220612173216im_/https://answers.unity.com/themes/thub/images/avi.jpg)