- Home /
How do i attach a mini map to a game object? and a few other questions..
ok so i have a few questions i can not figure out
how do i attach a minimap to a game object? like a screen on a computer showing were a camra is in a room
how do i make a button (that is also a game object the button is a cube) that changed the camra with the screen when you hit it
how do i have it were when you click the screen it disabled all scripts in the player and inbales all the scripts in the camra and when you hit backspace it goes back to the player?
Answer by b1gry4n · Oct 13, 2016 at 01:06 PM
Use raycasting from the camera on input. If the ray hits the button, do something : https://docs.unity3d.com/Manual/CameraRays.html
You will need some sort of manager script that does this using Input (https://docs.unity3d.com/ScriptReference/Input.html). If the input is pressed, enable or disable the objects you want by either making them public GameObjects in that script or any number of other ways you reference objects. Your manager script would never be disabled as it is the "overseer" and needs to be active at all times to take input from the player.
Your answer

Follow this Question
Related Questions
Problems with Minimap 1 Answer
Map Camera 1 Answer
Draw trapezoid on minimap with support for any camera angle 2 Answers
Make portion of mini map camera transparent 1 Answer
How can I make a clickable/functional RTS style minimap? 0 Answers