// scene change message will disable transports. // kcp processes messages in an internal loop which should be // stopped immediately after scene change (= after disabled) // => kcp has tests to guaranteed that calling .Pause() during the // receive loop stops the receive loop immediately, not after. public override void OnEnable() { base.OnEnable(); // unpause when enabled again client?.Unpause(); server?.Unpause(); }
// scene change message will disable transports. // kcp processes messages in an internal loop which should be // stopped immediately after scene change (= after disabled) // => kcp has tests to guaranteed that calling .Pause() during the // receive loop stops the receive loop immediately, not after. void OnEnable() { // unpause when enabled again client?.Unpause(); server?.Unpause(); }