Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Watching what "buttons".
If UI Button, then you can do this:
public void Clicked() {
text.SetActive(true);
}
- it is necessary to bind this method to the button as an event handler.
If this is a 3D button in the game, then this:
void OnMouseDown() {
text.SetActive(true);
}
If the camera rotation in the game is controlled by the mouse, then you need to lock the cursor in the center of the screen (for the 2nd case):
Cursor.lockState = CursorLockMode.Locked;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question