Hello, short and sweet: I would like to open and close the inventory in my game using a button.
I want to toggle the “I” key.
My code in the character controller script:
`if (Input.GetKey(KeyCode.I))
{
bool isActive = Panel.activeSelf;
Panel.SetActive(!isActive);
}`
I created a variable for the panel and linked the variable to my character with the panel.
public GameObjectPanel;
This works quite well so far, my only problem is that it flickers, as if the program couldn’t decide whether the panel is active or inactive. I just uploaded it… and I hope you can help me. Flickering Issue :( - YouTube
greetings from the north