- Home /
Button images disappear after selecting a button from the skills panel.
Specifically, the buttons work as intended, they still function however their images no longer do once I use a specific skill. I use this exact set up in my other game (on hiatus) and it works perfectly, the attacks come out and when the unit reaches back to the top of the processing bar the buttons appear.
Below is a preview of how its supposed to look
Below is what happens after I select and use a technique
As you can see the button images don't appear but I can assure you they're still there and fully functionally but I'm wondering if anyone has any idea as to why this is happening. I've never had this happen with the other game which has the exact same set up so I'm beyond confused. Thanks in advance and here's a snippet of code which shows what happens with the skill window active and with the skill window inactive. And I know it works properly but maybe someone will see something I don't.
{
if (skillwindow.activeSelf == true)
{
Attack.SetActive(false);
Defend.SetActive(false);
Wait.SetActive(false);
Technique.SetActive(false);
}
else
{
defendstatus = false;
Attack.SetActive(true);
Defend.SetActive(true);
Wait.SetActive(true);
Technique.SetActive(true);
ButtonManager.unitid = id;
currentstate = UnitStates.Idle;
}
}
Need extra information, if you are sure can you make sure they are at the same position? set them active to false at start and reset them to true just one line before for checking if the bug is happening there too? also if you can give us some herarchy photos would help.
I can confirm they're at the same position: When I click on where they're supposed to be they work and they appear like this in the editor:
This is the hierarchy:
It is weird, it feels like your Image component was removed/desactivate, also the text should be shown, make sure the Image script in the button is active.