When I run game from .exe file, generated gizmos from script don’t appear. But in editor they do. Why is this?
Hi there,
I think Gizmo’s are editor only thing (unless I’m mistaken, correct if wrong).
In editor you can show them in both 3d viewports and game view…
but not ingame.
I think you’d have to replicate Gizmo lines and spheres with some 3d elements / line rendering.
Thank you. But I’m new in Unity and I’m trying to create worms-like destructable terrain so I have created map.png image and i got an 2D array of 0 and 1 and created map from it using Gizmo.drawCube…
Any ideas how to get real objects out of it? Or what functions should I use?
You have many options;
If you want 2D map/level, you can just use sprites, just make one sprite for your 0 and for your 1…
Or if you want to use UI system and draw your map on Canvas, you could use UI Image components. Check out Unity training videos, they are very good.
If you want to create 3d world tiles / map, then you can just create a default 3D cube, then make some prefabs out of it and use them as your 0’s and 1’s of map data.
and how can i create these sprites in game? and with collider?
I have managed to create map with colliders but it takes too much time. I’m creating every pixel as a GameObject with a collider if it is 1…Am I doing it right? My map img is 1920x696