So I have been working on these for the past couple of days now and been looking everywhere and I have no idea how it is done. I have a cube that the mesh renderer is off so it is technically invisible. But I want to use a prefab to turn it back on with my shift keys. I made if statements to get it to work but it still isn’t working and I have no idea how to make it work or even proceed. This is what I have so far:
void Update()
{
if (Input.GetKeyDown(KeyCode.LeftShift) && (Input.GetKeyDown(KeyCode.RightShift)))
if (!Go)
{
Go = true;
//show Cube
}
if(Input.GetKeyDown(KeyCode.LeftShift))
{
Go = false;
}
if(Input.GetKeyDown(KeyCode.RightShift))
{
Go = false;
}
}