Hello, this particular problem made me a headache and i don’t know if that’s a bug or feature.
So what i have is Controller scripts looking like this:
public class BaseController: MonoBehaviour
{
}
public class AController: BaseController
{
protected virtual void OnDisconnectedFromServer ( NetworkDisconnection info )
{
Debug.Log("Disconnected A");
}
}
public class BController: AController
{
protected override void OnDisconnectedFromServer ( NetworkDisconnection info )
{
Debug.Log("Disconnected B");
}
}
Now my problem is that when i leave the server, OnDisconnectedFromServer (1 ) is called, but it gets called both on AController and then on BController. I have tried even shadowing or calling other method instead like here but no matter what, i cant get to disable/override the behaviour of AController when i have instance of BController. Am i doing something wrong or is this unity bug?
Thank you very much.