79139156

Date: 2024-10-29 22:21:48
Score: 0.5
Natty:
Report link

Add private bool firstT = true; and inside update add it to your if, also set the bool to false inside the condition ->

if(Input.GetKeyDown(KeyCode.T) && IsObjectXInvisible() && firstT)
{
    SpawnObject();
    firstT = false;
}

this ensures that SpawnObject(); happens only once.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Epidermis