Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

How do i activate a function - toggle button

Discussion in 'UGUI & TextMesh Pro' started by wiseowlstudios, Jun 28, 2015.

  1. wiseowlstudios

    wiseowlstudios

    Joined:
    Feb 13, 2011
    Posts:
    741
    Hi im trying to make a toggle full screen button but not sure what to put for the fuction thing
    the script im calling it in has :
    public static bool fullScreen;

    and later

    void Fullscreen() {
    Screen.fullScreen = !Screen.fullScreen;
    }

    what settings etc do i have to call on the toggle button to make it call this so when they toggle the button it switches between windowed and fullscreen
     
unityunity