Closed M1raclee closed 5 years ago
Hello @ByvDeveloper,
On the GlobalEventListener
we use the OnEnable
and OnDisable
callbacks to setup the internal events for a particular instance of this class. This way, you only need to call the base method in order to maintain Bolt working as expected, as shown below:
public class NetworkCallbacks : Bolt.GlobalEventListener
{
new void OnEnable()
{
base.OnEnable();
// My custom code
}
new void OnDisable()
{
base.OnDisable();
// My custom code
}
}
How to reproduce issue
Expected Behavior
Declare OnEnable/OnDisable as public virtual void OnEnable/OnDisable
Actual behavior
Warning: 'NetworkManager.OnEnable()' hides inherited member 'GlobalEventListenerBase.OnEnable()'. Use the new keyword if hiding was intended. (CS0108) [Assembly-CSharp]