Starter for making Packages, including automation for building and publishing them.
- This package requires you to follow a handful of steps and read through instructions at least once, please do it, they are not the exact same as the default VRChat template!
Once you're all set up, you'll be able to push changes to this repository and have .zip and .unitypackage versions automatically generated, and a listing made which works in the VPM for delivering updates for this package. If you want to make a listing with a variety of packages, check out VRChat's template-package-listing repo.
- With this, you can setup a new package in your existing dev project within a minute and get working straight on things without having to import and update various SDKs / dependencies.
- This fork was made to allow myself and others to make VPM packages without having to spin a new project per package, which is annoying for small, sometimes even single file packages.
- This also comes with an easy way to theme your "Add to VCC" button colors ! :3
- Press
to start a new GitHub project based on this template.
- Choose a fitting repository name and description.
- Set the visibility to 'Public'. You can also choose 'Private' and change it later.
- You don't need to select 'Include all branches.'
- Clone this repository locally using Git into an adequately named package folder in the unity project of your choice (for ex: "com.yourname.template")
- If you're unfamiliar with Git and GitHub, visit GitHub's documentation to learn more.
- Open the new folder in your file explorer
- Edit the source.json and package.json file with any text editor of your choice to fill in the info
- Edit the lines 7 to 9 in release.yml in the .GitHub/workflows folder of your new package with the same info
Full details at Converting Assets to a VPM Package
- Delete the "Runtime/Readme.txt" file or reuse it for your own package.
- If you are not making scripts or an avatar package, remove the U# assembly definition and the definitions in the package assembly.
- Update the file in the "Packages" directory to include your package.
- When you're ready, commit and push your changes.
- Once you've set up the automation as described below, you can easily publish new versions.
Go to the "Settings" page for your repo, then choose "Pages", and look for the heading "Build and deployment". Change the "Source" dropdown from "Deploy from a branch" to "GitHub Actions".
That's it! Some other notes:
- We highly recommend you keep the existing folder structure of this template.
- The root of the project should be a Unity Package folder.
- If you want to store and generate your web files in a folder other than "Website" in the root, you can change the
listPublicDirectory
item here in build-listing.yml.
You can make a release by running the Build Release action. The version specified in your package.json
file will be used to define the version of the release.
(You can use -pre.1 at the end to mark it as a prerelease and only appear when users enable it in the VCC)
Whenever you make a change to a release - manually publishing it, or manually creating, editing or deleting a release, the Build Repo Listing action will make a new index of all the releases available, and publish them as a website hosted fore free on GitHub Pages. This listing can be used by the VPM to keep your package up to date, and the generated index page can serve as a simple landing page with info for your package. The URL for your package will be in the format https://username.github.io/repo-name
.
You can edit the file 'Website/ColorScheme.css' and remove the comments on the theme color section you want to use for non-default buttons
- If you want to customize your buttons color on your default VRChat template, simply import ColorScheme.css to your Website folder, then add the line
<link rel="stylesheet" href="ColorScheme.css">
in the header of the 'Website/index.html' file of your own package!
The action which rebuilds the listing also publishes a landing page. The source for this page is in Website/index.html
. The automation system uses Scriban to fill in the objects like {{ this }}
with information from the latest release's manifest, so it will stay up-to-date with the name, id and description that you provide there. You are welcome to modify this page however you want - just use the existing {{ template.objects }}
to fill in that info wherever you like. The entire contents of your "Website" folder are published to your GitHub Page each time.
Obviously if you know me, you know I barely did anything here beside make it nice and tidy and put it all together for others.
-
Tapghoul For the help with figuring out how to make it work and learn how to setup that stuff in the first place / etc.
-
Rrazgriz For making a similar repo structure that made me want to make this in the first place
-
And of course VRChat for their Package template and the community's work
-
I did figure out and make the color scheme CSS file, file structure, nice instructions for the new way to do it, base files to make it faster and so on.
Enjoy :3