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. Dismiss Notice

Button stopped responding...

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

  1. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    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:
    851
    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,716
    I've tried recreating it... No luck.
     
  4. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    851
    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,716
    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:
    851
    nice!