Skip to content

Commit

Permalink
style: Use PascalCase for public fields
Browse files Browse the repository at this point in the history
Follow C# guidelines: public Client and Server fields
should use pascal PascalCase

BREAKING CHANGE: HeadlessAutoStart.* renamed to follow PascalCase
  • Loading branch information
paulpach committed Feb 2, 2021
1 parent 8a195f6 commit 9dc94c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Assets/Mirror/Components/HeadlessAutoStart.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Serialization;

namespace Mirror
{
public class HeadlessAutoStart : MonoBehaviour
{
public NetworkServer server;
[FormerlySerializedAs("server")]
public NetworkServer Server;

/// <summary>
/// Automatically invoke StartServer()
Expand All @@ -20,9 +22,9 @@ void Start()
// headless mode? then start the server
// can't do this in Awake because Awake is for initialization.
// some transports might not be ready until Start.
if (server && SystemInfo.graphicsDeviceType == GraphicsDeviceType.Null && startOnHeadless)
if (Server && SystemInfo.graphicsDeviceType == GraphicsDeviceType.Null && startOnHeadless)
{
server.ListenAsync().Forget();
Server.ListenAsync().Forget();
}
}
}
Expand Down

0 comments on commit 9dc94c1

Please sign in to comment.