class Father
{
public void Hello()
{
Debug.Log("hello");
}
public virtual void Say(string contents)
{
Debug.Log(contents);
}
public void Bye()
{
Debug.Log("bye");
}
}
//继承Adapter 省略
//热更DLL
class Child : Father
{
public override void Say(string contents)
{
Debug.Log("child is speaking: ");
base.Hello();
base.Say(contents);
Debug.Log("speaking is over");
}
}
var child = appDomain.Instantiate<Father>(name); child.Say("awesome");
var child = appDomain.Instantiate<Father>(name); child.Say("awesome");
输出仅为: child is speaking: hello speaking is over