Search Unity

Type IPointerClickHandler expected Button received. i:0. Wrong Key Length

Discussion in 'UGUI & TextMesh Pro' started by Ciryus, Aug 22, 2014.

  1. Ciryus

    Ciryus

    Joined:
    Sep 17, 2012
    Posts:
    38
    Hi everyone,
    here is my problem,
    I did create a simple Menu with a button.
    Onclick() event should trigger a "public void Login()" from an other gameObject in the scene but here is the issue. When I click on the button I get this error message:
    Type IPointerClickHandler expected Button received. i:0. Wrong Key Length

    I did search in the new documentation and didn't see what I am doing wrong.
    Anyone to help me?
    Thanks.
     
    Stream likes this.
  2. Ciryus

    Ciryus

    Joined:
    Sep 17, 2012
    Posts:
    38
    Ok sorry for posting that, the error came from my Login function, the fact that the console didn't point me to this function completely diturbed me.
    Resolved.
     
  3. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Hi, yes. We have improved the error message and it will be better in future releases (it will show you the real stack trace).
     
    Stream likes this.