Search Unity

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