You want to contribute to VPE? Awesome! Here are a few things you should know.
We rarely commit to master directly. Instead, we open pull requests and let our peers review the code before it gets merged.
- We rebase our commits to master, so the commit history stays linear.
- When a PR is about user-facing changes, we update the documentation.
- If a PR contains notable changes, we also update the changelog. Add your entry to the top of the appropriate section.
- We try to prefix our commit messages with a word that quickly tells the reader where the change happened. Examples are
editor
,doc
,<component-name>
, etc. - Changes that touch the core project should be unit-tested.
It's preferred to make the automated tests run when creating your PR. Since Unity needs a license key (which can be obtained with a free account), you'll need to configure your fork to use the correct secrets. You will need to use a Personal license and request a key on behalf of GitHub:
- Run the
License
workflow by clicking theRun workflow
button in theActions
tab. When the workflow completes, download and unzip theUnity_v2021.3.0f1.alf
artifact. - Visit license.unity3d.com, sign in, and upload the
Unity_v2021.3.0f1.alf
file. - You should now receive your license file (
Unity_v2021.x.ulf
) as a download. - Open
Github
><Your repository>
>Settings
>Secrets
- Create the following secret:
UNITY_LICENSE
- (Copy the contents of theUnity_v2021.x.ulf
license file here)
- Delete the
License
workflow run by selectingDelete workflow run
in the...
menu.
We aren't too picky about code style. Just start reading our code and you'll get the hang of it. There are a few rules though:
- We mostly use C#'s naming conventions.
That said, for
MonoBehaviours
we sometimes also use Unity's style that puts field names in camel case. - For the Unity projects, we use one namespace per project. For the core project, it's a namespace per folder.
- We use tabs for indentation.
- This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.
Have a look at the VPF thread if you have any question. We also have a Discord server for internal discussion.