static bool ContainAnB_(object source, List <object> target) { List <string> tList = new List <string>(); if (target.Count > 0) { if (target[0].GetType() == source.GetType()) { return(target.Contains(source)); }// 두 타입이 같으면 else { FieldInfo[] fields = target[0].GetType().GetFields(); for (int i = 0; i < fields.Length; i++) { //Debug.Log(EditText.Right(fields[i].ToString(), 2)); if (EditText.Right(fields[i].ToString(), 2) == "id") { for (int j = 0; j < target.Count; j++) { if (fields[i].GetValue(target[j]).ToString() == source.ToString()) { return(true); } } } } // targtList Field 중에 id가 있으면, } // 두 타입이 다르면 } return(false); }
public void NextTutorial(string tutorialNum = "default") { if (tutorialNum == "default" || tutorialNum == "") { tutorialNum = EditText.Left(name, 3) + (System.Convert.ToInt32(EditText.Right(name, 1)) + 1).ToString(); } Tutorial(tutorialNum, transform.parent); }