It is my understanding that sendMessage is used when two GameObjects are within a common parent Object, and they can call each other.
I am creating radio buttons and my code looks something like this:
public string MyName;//Must be unique to work properly
public void UnClick(string Name)
{
Debug.Log(Name);
if(Name != MyName)
{
MyButton.image.color = NotSelectedColor;
}
}
public void GetClicked()
{
SendMessage("UnClick", MyName);
SendMessageUpwards("NewClick", MyName);
MyButton.image.color = SelectedColor;
}
The idea that all the buttons within the common parent UI element will unclick when one of the buttons is clicked. The problem is that this sendmessage only calls within the object and not to the others. In this case: http://i.imgur.com/nUUu0ZW.png
So the BO5 button calls this and it should activate in both the BO5 and BO11 buttons as they have the same script. Is there a reason for this?