Unity has changes how to create server build in 2021
replace:
if (serverBuild)
buildOptions |= BuildOptions.EnableHeadlessMode;| using System; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| using UnityEngine; | |
| #endif | |
| namespace JamesFrowen.PositionSync | |
| { | |
| [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] | |
| public class BackingFieldNameAttribute : PropertyAttribute |
| using UnityEditor; | |
| using UnityEditor.Compilation; | |
| using UnityEngine; | |
| namespace JamesFrowen.EditorScripts.Compilation | |
| { | |
| /// <summary> | |
| /// Stop the game the scripts are recomplied | |
| /// </summary> | |
| [InitializeOnLoad] |
| using Cysharp.Threading.Tasks; | |
| using UnityEngine; | |
| namespace Mirage | |
| { | |
| /// <summary> | |
| /// An extension for the NetworkManager that displays a default HUD for controlling the network state of the game. | |
| /// <para>This component also shows useful internal state for the networking system in the inspector window of the editor. It allows users to view connections, networked objects, message handlers, and packet statistics. This information can be helpful when debugging networked games.</para> | |
| /// </summary> | |
| [DisallowMultipleComponent] |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace Mirror | |
| { | |
| /// <summary> | |
| /// Component that controls visibility of networked objects between scenes. | |
| /// <para>Any object with this component on it will only be visible to other objects in the same scene</para> | |
| /// <para>This would be used when the server has multiple additive subscenes loaded to isolate players to their respective subscenes</para> | |
| /// <para>Does not actively check if scene has changed</para> |
| using System.Text; | |
| using UnityEngine; | |
| namespace Mirage.SocketLayer | |
| { | |
| /// <summary> | |
| /// Monobehaviour to help debug a cloud server, can help check if ports are open and a socket is sending message correctly | |
| /// <para>Server will echo back the message that was sent to it</para> | |
| /// <para>Client will send 4 byte message every second, incrementing by 1 each time</para> | |
| /// </summary> |
| /* | |
| MIT License | |
| Copyright (c) 2021 James Frowen | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
| /* | |
| MIT License | |
| Copyright (c) 2021 James Frowen | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
| /* | |
| MIT License | |
| Copyright (c) 2022 James Frowen | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
| # Remove the line below if you want to inherit .editorconfig settings from higher directories | |
| ############################### | |
| # Core EditorConfig Options # | |
| ############################### | |
| root = true | |
| [*.{cs,csx,vb,vbx,md}] | |
| indent_style = space | |
| indent_size = 4 | |
| tab_width = 4 |