public void Test_Delegate_Func00() { onFuncHogeHoge = func00; //← デリゲート変数に関数を登録 string result = onFuncHogeHoge(); //← デリゲートを実行 Assert.AreEqual("func00", result); }
public void Test_Delegate_Func01() { string result; onFuncHogeHoge = func01; result = onFuncHogeHoge(); //<- デリゲート実行 Assert.AreEqual("func01", result); }
public void Test_Delegate_Func02() { string result; onFuncHogeHoge = () => { Debug.Log("func02"); return("func02"); }; result = onFuncHogeHoge(); //<- デリゲート実行 Assert.AreEqual("func02", result); }