private void RefreshTargetTile(GridController grid, GridElementController elem, Vector2?gridPosition = null) { var ray = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition); gridPosition = gridPosition ?? grid.RaycastGrid(ray); targetTile = gridPosition == null ? new GridTile(0, 0) : grid.GetGridTile(gridPosition.Value); isSuitableTile = grid.CanPlaceIn(elem, targetTile); }