public GameObject Create(string name, int x, int y) { GameObject obj = Instantiate(chessPiece, new Vector3(0, 0, -1), Quaternion.identity); Checker cm = obj.GetComponent <Checker>(); cm.name = name; cm.SetXBoard(x); cm.SetYBoard(y); cm.Activate(); return(obj); }