Why no base on overrides

In Unit.cs we override OnStartServer and OnStopServer (plus the client versions).
And in RTSPlayer.cs we also override these methods.

Why did you remove the base call for these? We kept the base call in all the overrides we have done prior.

1 Like

I think he didn’t override them because they are not implemented in base class that mean methods are just empty brackets OnStartClient { }. Therefore its not important to call base methods. But if base method has impelentation ( like OnServerAddPlayer(NetworkConnection conn) its easy to call base method for connection which already implemented on base class so we dont need to rewrite code in overridden method) then we can use base class virtual methods.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms