Table of Contents

Contributors Forks Stargazers Issues


Logo

Project Setup [Definitive Infinity Media]

Package designed to import dependencies and packages for starting up a new project
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Automated setup via the Unity CLI
  5. Dependencies
  6. Samples
  7. Contributing
  8. Contact
  9. Acknowledgments

About The Project

Package designed to import dependencies and packages for starting up a new project

(back to top)

Getting Started

Follow one of the installation methods below to add this package to your Unity project.

Prerequisites

Unity 6.0 (6000.0) or later is required to use this package, so that the bundled CLI setup commands (see Automated setup via the Unity CLI) can run through com.unity.pipeline.

Installation

Method 1: Package Manager (Git URL)

  1. Open the Package Manager window in Unity (Window > Package Manager).

  2. Click the [+] button in the top-left corner and select Add package from git URL.

  3. Enter the following URL and click Add:

    https://github.com/Definitive-Infinity-Media/com.definitiveinfinitymedia.projectsetup.git
    

For more details on Git URLs in Unity, see the Unity documentation.

Method 2: Scoped Registry

  1. Open Edit > Project Settings > Package Manager.

  2. Add a scoped registry with the following details:

  3. Create a .upmconfig.toml file in your user root directory:

    • Windows: %USERPROFILE%\.upmconfig.toml
    • macOS/Linux: ~/.upmconfig.toml
  4. Add your GitHub personal access token:

    [npmAuth."https://npm.pkg.github.com/@Definitive-Infinity-Media"]
    token = "YOUR_GITHUB_PAT"
    email = "your-email@example.com"
    alwaysAuth = true
    
  5. Add the package to your Packages/manifest.json:

    "com.definitiveinfinitymedia.projectsetup": "1.0.8"
    

Learn more: Creating private packages for your Unity project.

Method 3: Direct Clone (for development)

Clone this repository directly into your project's Packages folder:

git clone https://github.com/Definitive-Infinity-Media/com.definitiveinfinitymedia.projectsetup.git

(back to top)

Usage

Use the components, tools, and samples provided by this package in your Unity project. For API documentation and examples, please refer to the Documentation.

You can also run setup from inside the Editor, through Tools > Definitive Infinity Media > Project Setup, or fully unattended through the Unity CLI. See below.

(back to top)

Automated setup via the Unity CLI

This package exposes every setup step as a command the Unity CLI (the unity command line tool) can run against a Unity Editor, including one that has never had a person open it. This makes it possible to bootstrap a brand new project entirely from a script or a CI job.

Commands (each mutating command requires confirm=true; pass dry_run=true to preview without changing anything):

Command What it does
dim_projectsetup_validate Reports missing folders, packages, or player settings (read only).
dim_projectsetup_create_folders Creates the standard folder structure.
dim_projectsetup_write_upmconfig Writes the registry token and email into ~/.upmconfig.toml.
dim_projectsetup_setup_registry Adds the DIM scoped registry entry to Packages/manifest.json.
dim_projectsetup_install_packages Installs the configured custom and Unity packages, waiting for each to finish.
dim_projectsetup_install_asset_store_packages Imports any Asset Store .unitypackage files already staged on disk (see the note below).
dim_projectsetup_project_settings Sets company name, icon, and splash logo.
dim_projectsetup_full_setup Runs every step above in order, stopping at the first one that fails.

Every command is safe to run more than once: each one checks what is already done and skips it, so re running dim_projectsetup_full_setup after a partial failure only finishes what is left.

Required environment variables (read by dim_projectsetup_write_upmconfig; never write these into a file this package's source controls):

  • UNITY_PROJECTSETUP_REGISTRY_TOKEN: a GitHub personal access token with access to this scoped registry.
  • UNITY_PROJECTSETUP_REGISTRY_EMAIL: the email paired with that token.

A note on Asset Store packages: dim_projectsetup_install_asset_store_packages imports .unitypackage files that must already exist on the machine's disk from a prior, manual Asset Store download; there is no live download step. On a CI machine that has never downloaded them interactively, stage the files first (for example from a shared cache or build artifact); the command reports any missing file instead of failing the whole run.

Bootstrapping a brand new project end to end, for example in a CI job:

# 1. Create a new project
unity projects create MyProject --editor-version 6000.0

# 2. Add this package and com.unity.pipeline to the new project's manifest
#    (edit MyProject/Packages/manifest.json, or use your usual package add step)

# 3. Launch a persistent headless Editor for that project (no -quit, stays resident)
"$UNITY_EDITOR_PATH" -batchmode -projectPath MyProject -logFile editor.log &

# 4. Wait for it to report ready, then run full setup
unity status --project-path MyProject
UNITY_PROJECTSETUP_REGISTRY_TOKEN=*** UNITY_PROJECTSETUP_REGISTRY_EMAIL=*** \
  unity command dim_projectsetup_full_setup confirm=true --project-path MyProject --format json

See the Unity CLI reference for unity projects, unity status, and unity command in full.

(back to top)

Dependencies

Package Version Why
com.unity.pipeline 0.5.0-exp.1 Lets the Unity CLI drive this package's setup commands (see above). Requires Unity 6.0+.
com.unity.nuget.newtonsoft-json 3.2.2 Safe JSON parsing and merging when editing Packages/manifest.json.

(back to top)

Samples

  • Example Scene — Contains an example scene for the package (Samples/Example Scene)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this package better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Contact

Definitive Infinity Media - contact@definitiveinfinitymedia.com

Project Link: https://github.com/Definitive-Infinity-Media/com.definitiveinfinitymedia.projectsetup

(back to top)

Acknowledgments

(back to top)