Paket.Unity3D


Quick start guide

This guide will show you how to use Paket.Unity3D and make NuGet dependencies available in your Unity3D project.

Unity3D project

Given a Unity3D project named YourAwesomeGame with the following directory structure:

1: 
2: 
3: 
4: 
5: 
6: 
.
└── YourAwesomeGame
    ├── Assets
    ├── Library
    ├── ProjectSettings
    └── Temp

Installation

You will need to install both Paket and Paket.Unity3D. The simplest way is to create a .paket directory next to your Assets directory and download the bootstrapper executables.

paket.bootstrapper.exe can be found at Paket releases

paket.unity3d.bootstrapper.exe can be found at Paket.Unity3D releases

Once you've got both files in your .paket directory, fire up a shell and run both bootstrappers:

1: 
2: 
$ [mono] .paket/paket.bootstrapper.exe
$ [mono] .paket/paket.unity3d.bootstrapper.exe

This will download the latest executables of Paket and Paket.Unity3D into your .paket directory.

Initialization

You will have to create a file called paket.dependencies with the following content:

1: 
source https://nuget.org/api/v2

More on paket.dependencies

Adding a nuget dependency

To add a NuGet dependency, Wooga.Lambda is used as an example here, append the following to your paket.dependencies file:

1: 
nuget Wooga.Lambda

More on NuGet dependencies

Downloading the dependency

To actually download Wooga.Lambda you'll need to run:

1: 
$ [mono] .paket/paket.exe update

More on paket update

Referencing the dependency

You will have to create a file called paket.unity3d.references next to your Assets directory with the following content:

1: 
Wooga.Lambda

More on paket.unity3d.references

Installing the dependency

Once the dependency is downloaded you will want to actually add it to your Unity3D project by running:

1: 
$ [mono] .paket/paket.unity3d.exe install

Your project directory should now look like this:

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
.
└── YourAwesomeGame
├── Assets
│   └── Paket.Unity3D
│       └── Wooga.Lambda
│           └── Wooga.Lambda.dll
├── Library
│   └── [...]
├── ProjectSettings
│   └── [...]
├── Temp
│   └── [...]
├── packages
│   └── Wooga.Lambda
│       └── [...]
├── paket.dependencies
├── paket.lock
└── paket.unity3d.references
Fork me on GitHub