Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.75 KB

File metadata and controls

68 lines (47 loc) · 2.75 KB

Installing com.unity.transport

Note: Before you continue, make sure you have git installed and configured.

Open up a terminal and navigate to where you want to have your samples root folder and run the command:

$ git clone https://github.com/Unity-Technologies/multiplayer

This command makes git clone the repository into a folder called multiplayer.

Setup a project in Unity

Start up the Unity Editor and begin by creating a New Project. Set the project location to the same root folder as the cloned multiplayer repository, name it client-server. Your root should look something like this:

client-server/
multiplayer/

Update the manifest file inside the Packages folder, so it points to our newly downloaded preview package.

Open up the Packages/manifest.json file in your favorite editor and, inside the {} under "dependencies", add the line: "com.unity.transport": "file:../../multiplayer/com.unity.transport",

The path "../../multiplayer" is relative, this means that if you go two levels up in the folder structure there should be a folder called multiplayer. See overview below:

:.                         
├───client-server           
│   ├───Assets              
│   │   ├───Scenes          
│   │   └───Scripts         
│   ├───Packages            <- We are here.
│   │       manifest.json   
│   │                       
│   └───ProjectSettings     
└───multiplayer        
    ├───com.unity.transport <- We want to point to here.
    └───network.bindings    

Note: In some cases, you might also need to add the line "com.unity.mathematics": "0.0.12-preview.19", to your manifest file. If so, set the Scripting Runtime Version to .NET 4.x Equivalent. You can find these settings under Edit > Project Settings > Player > Configuration.

Your file should now look something like this:

Filename: Packages/manifest.json

{
  "dependencies": {
    "com.unity.transport": "file:../../multiplayer/com.unity.transport",
    "com.unity.mathematics": "0.0.12-preview.19",
    "com.unity.ads": "2.0.8",
    ...
    "com.unity.modules.xr": "1.0.0"
  }
}

Go back to the Editor, and you should see it reloading. When finished, you can open up the Packages tree inside the Project view and find a new package called com.unity.transport.

Packages View

You should see a message indicating that there were no errors. If so, you are ready to go on to the next phase.

Note: If you encounter errors, please report an issue in the repository.

Back to table of contents