public bool countercube;
public void Toggle_mycube(){
if(countercube){
GameObject[] gameObjectArray = GameObject.FindGameObjectsWithTag ("mycube");
foreach(GameObject go in gameObjectArray){
go.SetActive (false);
}
countercube = false;
}
else {
GameObject[] gameObjectArray = GameObject.FindGameObjectsWithTag ("mycube");
foreach(GameObject go in gameObjectArray){
go.SetActive (true);
}
countercube = true;
}
}