Below is the snippet of my code. I want to set "buyButton" to active when "button" is selected and set the "button" to false at the same time . Do this vice versa. But what i get is either both the buttons disappear off the screen or both the buttons showing on top of each other. Can you help me with this and how this can be achieved in NGUI.
If not, is there a possibility where I can change the depth value of the buttons so that I can change which button is on top of the other button.
if(IsSelected)
{
NGUITools.SetActive(buyButton.gameObject,true);
Position = buyButton.transform.position;
buyButton.transform.position = Position;
NGUITools.SetActive(button.gameObject,false);
}
else if(IsSelected == false)
{
NGUITools.SetActive(button.gameObject,true);//this part does not work, it does not go back to true.why?
NGUITools.SetActive(buyButton.gameObject,false);
}
thanks in advance for anyone with the help