Porting Unity 3.3 project to 4.6, New UI dont work

I imported a project from Unity 3.3 to Unity 4.6 everything works fine. Now I want to port the old OnGUI code to the new UI System (I worked already on the new UI in another project, and understand how it works).

But the new UI is not working at all, I create a Canvas, then a Button. The Button is displayed but it has no function, hover, clicked etc. nothing happens no events fired at all. Then I thought some code in the current Scene was causing this behavior but it was not, created a new Scene>>Canvas>>Button still no effect.

When creating a new 4.6 Project and then Canvas>>Button it is all working as expected. Some one encountered a similar problem or know what is causing this?

Thanks in advance,


Move the button to the last item on that canvas.

Seems counter intuative but the lowest item in the hierarchy is shown in front of all other objects on a canvas.

If there is something in front of it that’ll fix it


OK then does the Canvas have a Canvas Group on it and if so is Interactable and Blocks RayCast ticked?


Hold on. Where’s the OnClick part of your button?

Should be just under visualize but its not!

Try this. Add an event trigger to your button and put in an on pointer click event then pick a way of showing that event happens. Say put a simple script on the button to debug.log it.

You shouldn’t have to do this though a button with no OnClick is a whole heap of wrong.

It’s normal, the new UI has a different way to handle events.

For buttons you can add OnClick methods directly from the inspector.

For other events you need to import UnityEngine.EventSystems and your script must inherit from interface like IPointerClickHandler, IPointerDownHandler, etc…