public IEnumerator ThirdPersonUserControl_Skill_P_Test_WithEnumeratorPasses() { UnityEngine.SceneManagement.SceneManager.LoadScene("Untitled"); SetCharacter.istest = true; yield return(null); /// init GameObject GameObject hero = SetCharacter.hero; Assert.AreNotEqual(hero, null); hero.transform.position = new Vector3(12, 0, 15); hero.transform.rotation = Quaternion.identity; GameObject enemy = SetCharacter.enemy; Assert.AreNotEqual(enemy, null); enemy.transform.position = new Vector3(14, 0, 15); enemy.transform.rotation = Quaternion.identity; hero.transform.LookAt(enemy.transform); /// init script test yield return(null); ThirdPersonUserControl testcs = hero.GetComponent <ThirdPersonUserControl> (); attribute message = enemy.GetComponent <attribute> (); float prehp = message.HP = message.HP_max = 100f; /// test Skill4 message.Skill_Level [3] = 100; testcs.Operation_P(); yield return(new WaitForSeconds(1.5f)); Assert.Greater(prehp, message.HP); SetCharacter.istest = false; }