Beispiel #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        GameFieldScript script = (GameFieldScript)target;

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