Example #1
0
        private void Awake()
        {
            Instance = this;

            if (GridCellPrefab == null)
            {
                Debug.LogFormat("{0} | No GridCellPrefab assigned!", this);
                return;
            }

            _rectTransform   = GetComponent <RectTransform>();
            _gridLayoutGroup = GetComponent <GridLayoutGroup>();

            InitializeGrid();

            // Init editor tools
            MoveTool.Init(this);
            RotateTool.Init(this);
        }