I\'m creating a 3D, 1st person maze game in Unity. The objective of the game is to reach the other side of the maze before time is up. To make the game fun, for every round a pl
There are many ways to make an Object disappear in Unity.
The wall to make disappear:
public GameObject wallObject;
1.Deactive it
wallObject.SetActive(false);
2.Disable the Renderer component of the Wall then the collider so that other GameObjects can pass through it
wallObject.GetComponent<Renderer>().enabled = false;
wallObject.GetComponent<Collider>().enabled = false;
3.Destroy it.
Destroy(wallObject);
You can use Random.Range to generate the number number then use one of the method above to hide that wall.