my code is like this , how ever B.Log() will output base class Log2
I wonder that can new keyword hide it when function is called in base class?
I guess it's impossible as new is not as strong as override,zzzz
public class A
{
public void Log()
{
Log2();
}
public void Log2()
{
Debug.LogError("AAAAAAAAAA");
}
}
public class B : A
{
public new void Log2()
{
Debug.LogError("BBBBBBBbb");
}
}
I guess it's impossible as new is not as strong as override.