Interactive Menu system

Hiya,

So I’m not sure if this belongs more in scripting or GUI we’ll start here, it’s probably a bit of both. The project will ultimately be for mobile but I’m developing it just on windows until I get farther along and want to drop the money down for the SDK. I’m looking at developing my menu system a bit more and need some help to point in the right direction. What I would like to do is create a solar system with planets and other objects that rotate around the sun (easy to do in Studio Max) I want to bring that solar system into Unity and have planets and other objects within the solar system be “missions” the player gets to select on which to play, also easy to place down with simple GUI buttons.

Here’s where it gets more complex, I would like to make this interactable and alive… so the planets would circle the sun… the player can zoom in and out, they can also rotate the screens perspective.

So how do I go about making the GUI buttons so they can move, is there an option other than GUI.Buttons? How can the camera know if two buttons are on top of each other which button is closer? I would also like some GUI object surrounding the mission, like a hexagonal box identifying that there is a selectable mission at that location.

So I grabbed a quick image off the web and threw it into photoshop to make some changes

I placed white hexagonal markers around the planets and one of the moons. In the menu this would indicate that there is a mission to be played at that location. Notice on the bottom right mission the “moon” is over the “planet” indicator blocking it out because the “moon” takes precedence in that given location.

I will suggest you drop the ides of GUI, and work maybe with a sprite based approach which will be considered like any gameObject.

then you can just use ray cast to detect on which object / sprite your are on.
for your marker, either use a sprite also for this that can get to position of the planet you want, if you ever need to have them face camera you can do in a way they all time face your camera etc…

do not use OnGUI stuff for this , i think it will be easier to setup your menu then, well my opinion :slight_smile:

make a planet/moon a game object/prefab.
add a sphere collider and you can use onmousedown etc to detect if user pressed/clicked it.
you can also move the objects in a circular manner around the sun. if they have real 3d coordinates you can adjust viewpoint and camera perspective and unity cares about it. if you do this in gui this will be much harder.
concerning displaying of the planets make them also spheres (like the collider) and attach a rectangular texture to them. so they can also rotate like one would expect.
use camera.worldtoscreenpoint to get the position of an object in screenspace and draw your infos there with gui (size, missions available etc).
to draw an hexagonal/octagonal box around the planets draw it in a texture and display this texture with gui.label at the position you got from the previous step (scale it appropriately).

hint: you told hexagonal box but you displayed an octagonal one. so either change your image or your description to avoid confusion.