- Home /
Question by
MountDoomTeam · Dec 20, 2012 at 07:14 PM ·
camerabuttononguiresetlateupdate
calling OnGUI events are cancelled by LateUpdate?
hello, I have a camera script that sets camera position.
If I make a button to reset the camera position I press the button to reset the camera and nothing happens.-Why? I tried placing this code after the LateUpdate.
function OnGUI(){
if (GUI.Button (Rect(780,30,35,20),GUIContent("cam","reset camera position")))
{
camera.transform.position = Vector3.one;
}
GUI.Label (Rect(300,300,300,100),GUI.tooltip);
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613085725im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Creating a racing relay. 0 Answers
UI Buttons switch cameras 3 Answers
Debug.Log - Pressing Button readings. 2 Answers
Switch Camera On Button Press? 2 Answers
Making GUI Buttons on a GUI Texture 1 Answer