Код
using UnityEngine;
using System.Collections;
public class redaktor : MonoBehaviour {
public GameObject shlypa;
public GameObject bronya;
void OnGUI(){
GUI.backgroundColor = Color.red;
if (GUI.Button (new Rect (10, 10, 100, 30), "Item 1")) {
[color=red]shlypa.renderer.enabled = !shlypa.renderer.enabled;[/color]
}
}
}