Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shanecelis/unity-package-template
Creates a Unity 3D package from a template
https://github.com/shanecelis/unity-package-template
game package unity unity3d
Last synced: about 2 months ago
JSON representation
Creates a Unity 3D package from a template
- Host: GitHub
- URL: https://github.com/shanecelis/unity-package-template
- Owner: shanecelis
- License: mit
- Created: 2021-02-24T08:31:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-16T08:09:47.000Z (over 1 year ago)
- Last Synced: 2024-10-04T15:17:38.709Z (3 months ago)
- Topics: game, package, unity, unity3d
- Language: C#
- Homepage:
- Size: 85.9 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Unity Package Template
This is a Unity Package Template made according to Unity's [layout convention](https://docs.unity3d.com/Manual/cus-layout.html). It works as a dotnet template.
## Installation
Install the template from NuGet or from a cloned repository.
### Install from NuGet
Install the template from [NuGet](https://www.nuget.org/packages/SeawispHunter.Unity3D.Package.Template/).
$ dotnet new --install SeawispHunter.Unity3D.Package.Template
### Install from repository
Install the template from git repo.
$ git clone https://github.com/shanecelis/unity-package-template
$ dotnet new --install unity-package-template
## Usage
Create a directory. Choose the name carefully; its name is your package's name.
$ mkdir MyPackage
$ cd MyPackage
$ dotnet new unitypackage --company "My Company"This creates the following files (meta files excluded for clarity):
MyPackage
├── CHANGELOG.md
├── Documentation~
│ └── MyPackage.md
├── Editor
│ ├── EditorExample.cs
│ └── MyCompany.MyPackage.Editor.asmdef
├── LICENSE.md
├── README.md
├── Runtime
│ ├── MyCompany.MyPackage.asmdef
│ └── RuntimeExample.cs
├── Samples~
│ ├── Sample 1
│ │ └── Sample1.cs
│ └── Sample 2
│ └── pic.png
├── Tests
│ ├── Editor
│ │ ├── EditorExampleTest.cs
│ │ └── MyCompany.MyPackage.Editor.Tests.asmdef
│ └── Runtime
│ ├── MyCompany.MyPackage.Tests.asmdef
│ └── RuntimeExampleTest.cs
└── package.jsonThe generated package name is "com.mycompany.mypackage" but edit that to your liking. Many values are only located within the `package.json` file, like the package description. It's expected that you will edit it after generation.
$ $EDITOR package.json
## Using the Package
See Unity's documentation for ways that you can [share your package](https://docs.unity3d.com/Manual/cus-share.html) or the template's [README](_README.md).
## Technical Notes
### GUIDs
New GUIDs are generated on each invocation so there will be no meta file conflicts with separate packages. However, if you're adding a new file to this template, remember to add its GUID to the `.template.config/template.json` file. If you're adding a lot of files, use the `.template.config/collect-guids` bash script to help.
## Tips
The `Samples~` directory can be difficult to work when developing your package since Unity will not import it because it has the tilde suffix. One tip for Unix users is to make a symbolic link when you're developing your samples like this:
$ ln -s Samples\~ Samples
You may want to add `Samples` and `Samples.meta` to your `.gitignore` file.
## Acknowledgements
Thank you to [Adam Graham](https://twitter.com/Zigurous) of [Zigurous](https://zigurous.com) for creating [unity-package-template](https://github.com/zigurous/unity-package-template), of which this is a fork.