public GameObject Create(string _name, int _x, int _y) { GameObject toCreate = Instantiate(ChessPiecePrefab, new Vector3(0, 0, -1), Quaternion.identity); ChessPiece cp = toCreate.GetComponent <ChessPiece>(); cp.name = _name; cp.SetX(_x); cp.SetY(_y); cp.Activate(); return(toCreate); }