It’s really off topic for tis thread…
Have you considered freezing time while the windows are open? If you’re dragging items to the crafting table and get interrupted, you’re risking data loss… In any event, you need to get the UI to open and the crafting working FIRST, then then start worrying about adding in interruptions. Some of the issues you’ve encountered in the past are trying to do too many things at the same time, which has lead to unintended consequences.
As we’re adding multiple setups
- Inventory + Equipment
- Inventory + OtherInventory
- Inventory + Crafting
It might make sense to create three different HidingPanels, one with each configuration…
But for now… we’ll handle things this way…
Add the following to ShowHideUI in the Fields:
[SerializeField] private GameObject craftingTable = null;
//[SerializeField] CraftingTableUI craftingTableUI; //Whatever your UI is for the crafting table
public bool HasCraftingTable => craftingTable != null;
public void ShowCraftingTable(GameObject go)
{
uiContainer.SetActive(true);
craftingTable.SetActive(true);
//call setup on crafting table ui
}
Now your CraftingTable will want to find the ShowHideUI whose HasCraftingTable == true (much like in the Bank) and call ShowCraftingTable.