March 2018
Beginner
274 pages
6h 1m
English
The obvious next step is to get those buttons working. Of course, we need to add a little bit of scripting, shown as follows:
private List<GameObject> m_sceneObjects = new List<GameObject>();private List<GameObject> m_scenePlanes = new List<GameObject>();private bool m_planeOnState;public void ClearScene(){ foreach(var obj in m_sceneObjects) { Destroy(obj); } m_sceneObjects.Clear();}public void Planes(){ m_planeOnState = !m_planeOnState; //turn plane visibility on or off foreach(var plane in m_scenePlanes) { plane.SetActive(m_planeOnState); }}
Read now
Unlock full access