Nx Unity
Nx plugin for managing Unity projects and packages within a monorepo
nx-unity 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/nx-unity.git README Markdown
Copy this to your project's README.md
## Installation
Add **Nx Unity** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/nx-unity.git
```
[](https://www.pkglnk.dev/pkg/nx-unity)Dependencies (3)
README
Nx Unity
This repository contains two projects that integrate Unity development with Nx workspaces:
- An Nx plugin for Unity projects
- A Unity package to enable all plugin features
Nx Plugin
Location: packages/nx-unity
This plugin allows you to seamlessly integrate Unity projects into your Nx workspace. It provides custom executors and generators to streamline your Unity development workflow within the Nx ecosystem.
Unity Package
Location: packages/unity-package
This Unity package should be referenced in all Unity projects within your Nx workspace to fully utilize the features provided by the Nx plugin.
Getting Started
Install the Nx plugin in your Nx workspace:
npm install --save-dev nx-unity
New Project
If you want to start a new Unity project, generate one with the following command:
npx nx generate nx-unity:project
That's it! You can now open the generated Unity project in Unity Hub and start developing.
Existing Project
Integrating Nx into an existing Unity project is also possible, but requires manual setup.
- Create a
project.jsonfile in the root of your Unity project. Below is a minimal example with a build target for Windows:
{
"name": "client",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/<projectName>/Assets",
"targets": {
"build": {
"executor": "nx-unity:build",
"configurations": {
"windows": {
"executeMethod": "BuildCommands.BuildWindows"
}
},
"defaultConfiguration": "windows"
}
}
}
- Add the Unity package to the Unity project using OpenUPM:
npm install -g openupm-cli
openupm add com.danielkreitsch.nx-unity -r http://verdaccio.danielkreitsch.com
Support
Encountered an issue or have suggestions for improvements? Feel free to raise an issue.
Contributions are welcome!
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In