You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
3.5 KiB
71 lines
3.5 KiB
3 years ago
|
# Run steps
|
||
|
1. 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.
|
||
|
|
||
|
2. 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
|
||
|
|
||
|
3. master branch requires unity 2020.3 (C#8 syntax is used)
|
||
|
|
||
|
4. start Unity, menu File -> Open Project... -> Open Select the ET/Unity folder and click on the Select Folder button. 5.
|
||
|
|
||
|
5. Click on the Unity menu Assets -> Open C# Project to start vs
|
||
|
|
||
|
6. Run Tools->BuildCode on the Unity menu, this step will compile the client code
|
||
|
|
||
|
7. 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)
|
||
|
|
||
|
1. export table tools, compile the command line into the Bin directory after completion, execute dotnet Tools.dll --AppType=ExcelExporter
|
||
|
|
||
|
2. export protocol tool, compile and enter Bin directory, execute dotnet Tools.dll --AppType=Proto2CS
|
||
|
|
||
|
3. start server: dotnet Server.dll --Process=1 --Console=1
|
||
|
|
||
|
4. Double-click the Init scene in the Scenes directory in Unity and click Play to run it.
|
||
|
|
||
|
# Test state synchronization demo
|
||
|
1. 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.
|
||
|
|
||
|
2. Unity->tools menu->Package Tools, select PC, check whether to package exe, click Start Package, and type a PC package in Release directory.
|
||
|
|
||
|
3. Run Unity Login Enter the lobby Enter the scene
|
||
|
|
||
|
4. Run the PC package, log in and enter the lobby
|
||
|
|
||
|
5. Click the right mouse button to move the character
|
||
|
|
||
|
# Cautions.
|
||
|
|
||
|
I. Error causes are.
|
||
|
|
||
|
1. Chinese directory.
|
||
|
2. low version of VS
|
||
|
3. Rider does not have the relevant components installed
|
||
|
4. not installed .net6
|
||
|
5. not compile all projects on the server side
|
||
|
6. Rider should be updated to the latest version
|
||
|
7. Unity version is too low
|
||
|
8. Win7 users, no special settings
|
||
|
9. *If there is a dependency problem during the compilation process, it may be due to Unity - External Tools - Generate .csproj files for:
|
||
|
When the
|
||
|
1. Registry packages
|
||
|
2. Build-in packages
|
||
|
10. *If the package is missing "StreamingAsset", you can create a new StreamingAsset folder under ET\Unity\Assets.
|
||
|
|
||
|
|
||
|
|