3.5 KiB
Run steps
-
visual studio user instructions.
- Versions.
- Win10 and above users, use .net6, VS version, must use 2022 and above. Note that VS 2019 does not support .net6 and cannot be used.
- Win7 users, can not install VS 2022, need to use .net 5 and VS 2019, but note that additional settings are required to support ET compilation.
- Dependencies.
- The "Game Development with Unity" extension needs to be installed.
- In "Tools-Options-Tools for Unity-General", you need to change the disable full project generation to False in the Miscellaneous section, otherwise it will cause an error in your Codes directory. 2.
- Versions.
-
To use Rider 2021.2.2 (updated to the latest version), you need to install the following:
- Rider's Unity plugin
- Install .net6
- NET SDK 6.0.101 is not fully supported in Rider", but it does not actually affect the compilation (2021.12.21)
- 2021.3.x fully supports .net6
-
master branch requires unity 2020.3 (C#8 syntax is used)
-
start Unity, menu File -> Open Project... -> Open Select the ET/Unity folder and click on the Select Folder button. 5.
-
Click on the Unity menu Assets -> Open C# Project to start vs
-
Run Tools->BuildCode on the Unity menu, this step will compile the client code
-
Open ET/Client-Server.sln compile with Rider (must compile all project, right click VS solution, compile all) The red reference error is reported here because the Unity library has not been compiled into the Unity/Temp/Debug directory, which is generally ignored, you must ensure that Unity is open, and then just compile the Client-Server directly.Unity.Mono will copy the Unity libraries it depends on into Unity/Temp/Debug. Unity.ModelView UnityHotfix.View will all depend on the libraries under Unity/Temp/Debug. If you still burst red, close vs or rider, open unity first, then Client-Server.sln, then Compile Client-Server
Translated with www.DeepL.com/Translator (free version)
-
export table tools, compile the command line into the Bin directory after completion, execute dotnet Tools.dll --AppType=ExcelExporter
-
export protocol tool, compile and enter Bin directory, execute dotnet Tools.dll --AppType=Proto2CS
-
start server: dotnet Server.dll --Process=1 --Console=1
-
Double-click the Init scene in the Scenes directory in Unity and click Play to run it.
Test state synchronization demo
-
If you want to modify the configuration, go to the Excel directory and modify the corresponding table, do step 6 of the running steps, and then re-run the Server.App project to start the server.
-
Unity->tools menu->Package Tools, select PC, check whether to package exe, click Start Package, and type a PC package in Release directory.
-
Run Unity Login Enter the lobby Enter the scene
-
Run the PC package, log in and enter the lobby
-
Click the right mouse button to move the character
Cautions.
I. Error causes are.
- Chinese directory.
- low version of VS
- Rider does not have the relevant components installed
- not installed .net6
- not compile all projects on the server side
- Rider should be updated to the latest version
- Unity version is too low
- Win7 users, no special settings
- *If there is a dependency problem during the compilation process, it may be due to Unity - External Tools - Generate .csproj files for:
When the
- Registry packages
- Build-in packages
- *If the package is missing "StreamingAsset", you can create a new StreamingAsset folder under ET\Unity\Assets.