Hi i need to Activate and deactivate gameobject but i dont know how when i make script its only deactivate somebody can help me with i want on keypress F activate and then i want on keypress f too but deactivate
Thats my script :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
void Update () {
if (Input.GetKeyDown(“f”))
{
gameObject.SetActive(false);
}
}
}