SetActive not reacting on Buttonclick
I want to click on a button, which should activate another button, depending on a bool checked in my questmanager. The problem is, i need to click 2 times on the first button to make the second one active.
The first button just calls:
if (QuestManager.questManager.RequestAvailableQuest(questID))
{
acceptButton.SetActive(true);
acceptButtonScript.questID = questID;
Debug.Log("Quest: " + questID + " can be accepted");
}
else
{
acceptButton.SetActive(false);
}
I wonder what could be the problem? Why do i need to click on the button 2 times? Is that a timing thing? Or is there something wrong in my code? I mean everything works, button only on the 2nd click after starting the game. The other upcoming click seem to work with the first input.
I hope i find some help here.
Your answer
Follow this Question
Related Questions
How to keep bool true even when other method try to set it off 0 Answers
setactive panel from other scene 0 Answers
return object state when SetActive return to true 0 Answers
C# - A way to set UI gameObject as active and then inactive when pressed a second time 0 Answers
Set GUI Text active/inactive by clicking on a button? 2 Answers