mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
KcpTransport: virtual Awake/OnValidate/OnGUI to allow inheritance more easily
This commit is contained in:
parent
def24f8510
commit
7b1d6fd412
@ -92,7 +92,7 @@ public static TransportError ToTransportError(ErrorCode error)
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
protected virtual void Awake()
|
||||
{
|
||||
// logging
|
||||
// Log.Info should use Debug.Log if enabled, or nothing otherwise
|
||||
@ -130,7 +130,7 @@ void Awake()
|
||||
Debug.Log("KcpTransport initialized!");
|
||||
}
|
||||
|
||||
void OnValidate()
|
||||
protected virtual void OnValidate()
|
||||
{
|
||||
// show max message sizes in inspector for convenience
|
||||
ReliableMaxMessageSize = KcpPeer.ReliableMaxMessageSize(ReceiveWindowSize);
|
||||
@ -279,7 +279,7 @@ public static string PrettyBytes(long bytes)
|
||||
|
||||
// OnGUI allocates even if it does nothing. avoid in release.
|
||||
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
||||
void OnGUI()
|
||||
protected virtual void OnGUI()
|
||||
{
|
||||
if (!statisticsGUI) return;
|
||||
|
||||
@ -316,7 +316,7 @@ void OnGUI()
|
||||
}
|
||||
#endif
|
||||
|
||||
void OnLogStatistics()
|
||||
protected virtual void OnLogStatistics()
|
||||
{
|
||||
if (ServerActive())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user