4.6 Buttons and Different Colliders

Hi,

I am using a 4.6 button but I am coming across an issue. I have 3 close and complex buttons, but the image bounders are over lapping in some places. Is there a way that I can manually set a collider boundary up for these?

Thanks

Max

Hi El Maxo,

Sorry for my late reply

I had to report a bug as this feature is not working as expected.

Here is what should be done to achieve it:

Make your Sprite a Texture with the settings below:

Note: The image must not have anything entered into the “Packing Tag” text field. and Read/Write must be enabled.

You will also need the script below:

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class IgnoreAlphaScript : MonoBehaviour 
{
	public Image theButton;

	// Use this for initialization
	void Start () 
	{
		theButton.eventAlphaThreshold = 0.5f;
	}
}

Assign the button to the public Image Variable in the inspector and it should work.

In Conclusion: this should tell the button not to pick up mouse events when the mouse is over transparent sections of the button’s image.