Так вы определитесь, вам массив или словарь?
private Cell[,] Field;
private Dictionary<byte, Cell> Field = new Dictionary<byte, Cell>();
private Dictionary<(byte, byte), Cell> Field = new Dictionary<(byte, byte), Cell>();
StartPosX = Input.mousePosition.x;
StartPosY = Input.mousePosition.y;
offset = gameObject.transform.position - Camera.main.ScreenToWorldPoint(new Vector3(StartPosX, StartPosY, 10.0f));
gameObject.transform.position = Camera.main.ScreenToWorldPoint(PositionObj) + offset;
private Vector3 offset;
void OnMouseDown(){
offset = gameObject.transform.position -
Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 10.0f));
}
void OnMouseDrag(){
Vector3 newPosition = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 10.0f);
transform.position = Camera.main.ScreenToWorldPoint(newPosition) + offset;
}