Skip to content

Commit

Permalink
fix: call Obsoleted OnStartClient (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach committed Mar 27, 2019
1 parent 468ec80 commit 8dea50e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Assets/Mirror/Runtime/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,13 @@ public virtual void OnClientSceneChanged(NetworkConnection conn)
public virtual void OnStartServer() {}
[Obsolete("Use OnStartClient() instead of OnStartClient(NetworkClient client). All NetworkClient functions are static now, so you can use NetworkClient.Send(message) instead of client.Send(message) directly now.")]
public virtual void OnStartClient(NetworkClient client) {}
public virtual void OnStartClient() {}
public virtual void OnStartClient()
{
#pragma warning disable CS0618 // Type or member is obsolete
OnStartClient(NetworkClient.singleton);
#pragma warning restore CS0618 // Type or member is obsolete
}

public virtual void OnStopServer() {}
public virtual void OnStopClient() {}
public virtual void OnStopHost() {}
Expand Down

0 comments on commit 8dea50e

Please sign in to comment.