Unity package for simple multiplayer games.
You may skip this step if you already have a Unity project to import the package into.
- Create a new project in the Unity software version
2020.3.4f1
(or above) using3D Template
or open an existing project.
- Ensure the project
Scripting Runtime Version
is set to.NET 4.x Equivalent
:- In the Unity software select
Main Menu -> Edit -> Project Settings
to open theProject Settings
inspector. - Select
Player
from the left hand menu in theProject Settings
window. - In the
Player
settings panel expandOther Settings
. - Ensure the
Scripting Runtime Version
is set to.NET 4.x Equivalent
.
- In the Unity software select
-
Navigate to the
Packages
directory of your project. -
Adjust the UnityProject/Packages
manifest.json
in a text editor.- Ensure
https://registry.npmjs.org/
is part ofscopedRegistries
.- Ensure
com.moonleaf
is part ofscopes
.
- Ensure
- Add
com.moonleaf.udpnetwork.unity
todependencies
, stating the latest version.
A minimal example ends up looking like this. Please note that the version
X.Y.Z
stated here is to be replaced with .{ "scopedRegistries": [ { "name": "npmjs", "url": "https://registry.npmjs.org/", "scopes": [ "com.moonleaf" ] } ], "dependencies": { "com.moonleaf.udpnetwork.unity": "X.Y.Z", ... } }
- Ensure
-
Switch back to the Unity software and wait for it to finish importing the added package.
UDPServer github link for this package: https://github.com/EligijusK/UDPServer