Search Unity

Button stopped responding...

Discussion in 'UGUI & TextMesh Pro' started by LightStriker, Aug 31, 2014.

  1. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    I somehow deleted my canvas by accident, and I noticed this error too late to undo it. It wasn't prefabed... Doh!

    So, I remade it, the same way I made the first.

    For some reason, all the button are not responsive. They don't even highlight when I place the mouse over them. They are not disabled and are flagged "Interactable".

    I'm kinda in the dark here, because nothing is coded and I have no tool to debug what's going on.
     
  2. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    It sounds like you've lost the EventSystem object from your scene hierarchy.

    Add it back to the scene with the GameObject>UI menu.
     
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    I've tried recreating it... No luck.
     
  4. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    Well I'm out of ideas...

    I would create a new scene and get a basic GUI working, save it to a prefab then bring it to your first scene to see if it works there.
     
  5. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    Found it... For some reason, when I recreated it, I probably created the Canvas directly, which doesn't create a Graphic Raycaster component with it.

    Creating a button in a scene without a Canvas creates a Canvas with the proper component.
     
    Last edited: Sep 1, 2014
  6. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    nice!