adding game name to api updater (#2036)

This commit is contained in:
James Frowen 2020-06-25 12:14:50 +01:00 committed by GitHub
parent 7d0e907b73
commit 18691dabe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View File

@ -11,6 +11,7 @@ public class ApiUpdater : MonoBehaviour
{
NetworkManagerListServer manager;
ApiConnector connector;
public string gameName = "Game";
void Start()
{
@ -70,7 +71,7 @@ void AddServer(int playerCount)
connector.ListServer.ServerApi.AddServer(new ServerJson
{
displayName = $"Pong Game {(UnityEngine.Random.value * 1000).ToString("0")}",
displayName = $"{gameName} {(UnityEngine.Random.value * 1000).ToString("0")}",
protocol = protocol,
port = port,
maxPlayerCount = NetworkManager.singleton.maxConnections,

View File

@ -65,6 +65,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1f6e5d5acb5879f45a2235ae0f44dc92, type: 3}
m_Name:
m_EditorClassIdentifier:
gameName: Pong Game
--- !u!114 &1442807832621757098
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 4798169800353248837}
- component: {fileID: 4798169800353248833}
- component: {fileID: 5399210850297115757}
- component: {fileID: 5256484632236059241}
- component: {fileID: 1442807832621757098}
- component: {fileID: 4798169800353248834}
m_Layer: 0
@ -65,6 +66,19 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1f6e5d5acb5879f45a2235ae0f44dc92, type: 3}
m_Name:
m_EditorClassIdentifier:
gameName: Tanks Game
--- !u!114 &5256484632236059241
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4798169800353248846}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76dab753e7255254687cd57985d8d675, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1442807832621757098
MonoBehaviour:
m_ObjectHideFlags: 0