예제 #1
0
        /// <summary>
        /// Per frame update.
        /// </summary>
        private void Update()
        {
            if (Input.GetKeyDown(KeyCode.LeftAlt))
            {
                isLeftAltKeyDown = true;
            }

            if (Input.GetKeyDown(KeyCode.RightAlt))
            {
                isRightAltKeyDown = true;
            }

            if (Input.GetKeyUp(KeyCode.LeftAlt))
            {
                isLeftAltKeyDown = true;
            }

            if (Input.GetKeyUp(KeyCode.RightAlt))
            {
                isRightAltKeyDown = true;
            }

            if ((isLeftAltKeyDown || isRightAltKeyDown) &&
                Input.GetKeyDown(KeyCode.Return))
            {
                if (Screen.fullScreen)
                {
                    ResolutionUtility.ScaleToWindow();
                }
                else
                {
                    ResolutionUtility.ScaleToFullScreen();
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Initialization.
 /// </summary>
 private void Start()
 {
     // Set to window on startup.
     ResolutionUtility.ScaleToWindow();
 }