public override void OnInspectorGUI() { DrawDefaultInspector(); GameFieldScript script = (GameFieldScript)target; if (GUILayout.Button("Создать игровое поле")) { script.BuildGameField(); } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); throw new UnityException("Не поддерживается больше 1-го экземпляра игрового поля"); } }