It might break under unpredictable circumstances. It might not contain features you expect. It might contain bugs.
If you encounter any issues, if you have features you'd want included, if you've found a bug, please, file a GitHub issue.
This package is a full-featured solution to automate creation of new Unity packages. It carefully follows recommended package layout. The goal is to reduce friction and number of boilerplate-kind of actions when creating new Unity packages. The constructor does nothing more than is outlined in Unity's instructions on creating custom packages. It just does it automatically, saving your valuable time.
As I don't have necessary capabilities to thoroughly test package on various OS and setups, I encourage anyone who has tried it and it worked for them to report it. There's nothing platform-specific or unity-version-specific in what this package does, so it should work, but I cannot guarantee it.
Package has been tested and confirmed to work on Unity 2022.2.18f1 and 2022.3.0f1. It should work on any Unity version that supports Unity Package Manager GUI (2018.1+).
Package has been tested and confirmed to work on Windows 11 22H2. It should work on any OS.
Install via git url:
https://github.com/JoanofArcGames/com.joanofarcgames.package-constructor.git
- Open Unity Package Manager
- In top-left corner, click
+
- Choose
Add package from git URL...
- Paste git url of this package:
https://github.com/JoanofArcGames/com.joanofarcgames.package-constructor.git
- Click
Add
/ pressEnter
- In
/Assets/
directory,right click
–create
–JAG
–Construction config
- Set up the config. Use the guide below for reference
- Click
Construct
button at the bottom of config file's inspector- If config contains invalid data, errors will be reported in Console window, and construction will be aborted
Note: to maximize time you save by using this package, it is recommended to keep all your packages in a single project with Package Constructor installed and configured.
This is what goes to your package.json
file, which is the core of every Unity package.
It contains all valuable information about the package,
such as name, version, description, dependencies, links to changelog, documentation, etc.
Read more in Unity Manual
-
Version
– This is current version of your package. It must comply with semantic versioning pattern. -
Company Name
andPackage Name
– Name of your company and your package. They must be PascalCase.- Note: you can specify additional nested namespaces divided with
.
inPackage Name
. - Note:
Company Name
andPackage Name
will get automatically combined and converted into reverse domain name notation, such ascom.unity.entities
orcom.unity.burst
.
For example,MyAwesomeCompany
andMyAwesomePackage
will result incom.my-awesome-company.my-awesome-package
.
See Unity Manual for package naming conventions.
- Note: you can specify additional nested namespaces divided with
-
Display Name
– User-friendly name to appear in Unity editor, such asEntities
orBurst
. -
Description
– A brief description of the package. This is the text that appears in the details view of the Package Manager window. This field supportsUTF–8
character codes. -
Unity Version
andUnity Release
– The lowest Unity version compatible with the package.Unity Version
is<MAJOR>.<MINOR>
, such as2022.3
.Unity Release
is<UPDATE>.<RELEASE>
, such as0f1
.- Note: if these fields are omitted, Package Manager considers your package compatible with all Unity versions.
- Note: if
Unity Version
is omitted,Unity Release
will make no effect. - Note: a package that isn't compatible with Unity doesn't appear in Package Manager window.
-
Documentation URL
,Changelog URL
andLicenses URL
– You can specify links to web pages containing related information about you package. -
License
– Identifier for an OSS license using the SPDX identifier format, or a string such asSee LICENSE.md file
. -
Hide In Editor
– Whether or not to hide your package in Editor. Most packages have this set totrue
.
Specify packages that your package depends on. Use official names in reverse domain name notation and semver versions.
Keywords are used by the Package Manager search APIs. This helps users find relevant packages.
Specify information related to either you personally, or your company.
Note: if you fill either email
or url
, the name
field must be filled as well.
Put your code/assets that are specific to Unity editor in this directory.
Assembly definition which is constructed by default is configured to only include Editor as platform,
meaning code you put there will not ship with built game. For example, Package Constructor's files are in this directory.
Put your code/assets that are supposed to work anywhere besides Unity editor in this directory.
Tests for code in /Editor/
and /Runtime/
directories, correspondingly.
Note: to be able to run tests, com.unity.test-framework
has to be installed in your project.
See Unity Manual for details.
Directory to include samples, if any. See Unity Manual for details.
Most packages require some form of documentation. See Unity Manual for details.
This is where you write overview of your package, installation instructions, notes, screenshots, etc.
For example, this text is part of a README file.
Markdown syntax cheat sheet
Examples of readme files
This is version history of your package.
Your git log is not a changelog
Keep a changelog
This is where you put your license in form of plain text or a link to appropriate web page.
Read about software licensing
SPDX License List
Meeting legal requirements
In case your package is using third-party libraries or assets of any kind, you might have to include their licenses.
Read more about third party notices in Unity Manual
This option is available only if you have selected to include /Documentation~/
directory.
Provides you with a template documentation file which complies with Unity's guidelines.
Generates a blank .cs
script alongside each .asmdef
file.
Otherwise Unity will complain in console that you have assemblies with no scripts associated.
Display informational messages in console regarding construction. This doesn't affect config validation errors.
- Currently, I am unaware of how to disable warnings regarding asmdefs with no scripts associated, other than including placeholder scripts. If you have ideas, communicate them to me.
- Currently, constructor doesn't add entry for samples into
package.json
. It doesn't make sense to do so, because when you just start your package, you don't have any samples. Probably I will add functionality to auto-generate entries for samples and inject them to existingpackage.json
.