I have 15 buttons on my screen at onClick event am fetching the button and hiding that button using
EventSystem.current.currentSelectedGameObject.SetActive(false);
now at the end i have to show buttons again so i am using
for (int i = 0; i < 15; i++)
{
tag1 = "Button" + (i + 1);
GameObject.FindGameObjectWithTag(tag1).SetActive(true);
Debug.Log("done");
}
Loop is giving error becuase it is not able to find object which has been hidden or setActive(false) from other references unity forum i see same solution but i don't know why it is not working in my case
i know issue is with "FindGameObjectWithTag" function i will have to replace it with some other
any help will be appreciated
Thanks