Search Unity

How can I unfocus a button on UI 4.6

Discussion in 'Immediate Mode GUI (IMGUI)' started by rushanedublin, Nov 12, 2014.

  1. rushanedublin

    rushanedublin

    Joined:
    Nov 12, 2014
    Posts:
    2
    Once I select a button in the new unity UI I cant figure out how to take the focus off of the UI (or the button). I need a button to remain showing so the user can click it, but because its still visible, after pressing it once it stays focused during gameplay.
     
  2. Stoven

    Stoven

    Joined:
    Jul 28, 2014
    Posts:
    171
    Marrt and rushanedublin like this.
  3. Marrt

    Marrt

    Joined:
    Feb 7, 2012
    Posts:
    613
    Unity 5.3.4, This is how it is done now:
    Code (CSharp):
    1. using UnityEngine.EventSystems;
    2.  
    3. EventSystem.current.SetSelectedGameObject(yourGameObject);
    4.