public void AddComp1() { Log("Before AddComponent"); MonoB monoB = testObject.AddComponent <MonoB>(); Log("After AddComponent"); monoB.Hello(); }
public void AddComp2() { //testObject.SetActive(false); Log("Before AddComponent"); MonoB monoB = testObject.AddComponent <MonoB>(); Log("After AddComponent"); monoB.Hello(); Log("SetActive(true)"); testObject.SetActive(true); }