Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Ignore Copyright Year formatting change.
347c826192d4015e8b64287a7d23468955f12158
d49bd9716eb5776b180a09bcd3d07288efc7a025
47 changes: 28 additions & 19 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
about: Report a bug with the Unity plugin, packages, examples, or documentation
title: ''
labels: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.
A clear and concise description of the problem.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
1. Open '...'
2. Import or configure '...'
3. Enter Play Mode / build / run '...'
4. Observe '...'

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
**Actual behavior**
Describe what happened instead, including any error messages.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Project details**
- Unity version:
- Plugin/package version:
- Installation method: OpenUPM / Git URL / local package / .unitypackage / other
- Packages affected:

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Environment**
- OS:
- Target platform:
- XR runtime / SDK:
- Device / headset:
- Ultraleap hardware:
- Tracking software version:

**Logs, screenshots, or videos**
If applicable, add screenshots, recordings, stack traces, or relevant excerpts from the Unity Console / Player log.

**Minimal reproduction**
If you can provide a minimal repro project, scene, or script snippet, describe it here or link to it.

**Additional context**
Add any other context about the problem here.
Add any other context that may help investigate the issue.
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: 'enhancement'
assignees: ''

---
Expand Down
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Summary

_Add a Summary here._

## Contributor Tasks

- [ ] Add a CHANGELOG entry for this change.
- [ ] Ensure documentation requirements are met e.g., public API is commented.
- [ ] Consider any licensing/other legal implications for this PR e.g. notices required by any new libraries.

## Test Cycle

_Link to the test cycle here._

## Reviewer Tasks

- [ ] Code reviewed.
- [ ] Non-code assets e.g. Unity assets/scenes reviewed.
- [ ] All tests must be ran and cover all scenarios (If not, add new tests and run them).
- [ ] Documentation has been reviewed.
- [ ] Approve with a comment of any additional tests run or any observations.
21 changes: 3 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
## Pre-Release Tasks

[Pre-release](https://ultrahaptics.atlassian.net/wiki/spaces/SV/pages/3665625233/Unity+Plugin+Development+Release+Process#Pre-release-Steps)
- [ ] Update JIRA release version number. _See the [releases page](https://ultrahaptics.atlassian.net/projects/UNITY?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page)._
### Pre-release
- [ ] Update package.json versions and dependencies
- [ ] Update client libraries (.dll, .so, .dylib)
- [ ] Update changelog date, release version & client library versions
- [ ] Update Readme if required
- [ ] Apply CI formatting patch
- [ ] Ensure documentation requirements are met e.g., public API is commented.
- [ ] If this is a major release, action any `Obsolete` items and other breaking considerations.

- [ ] Run the required tests for the release
- [ ] Complete the request to release on Cognidox

[After Approval](https://ultrahaptics.atlassian.net/wiki/spaces/SV/pages/3665625233/Unity+Plugin+Development+Release+Process#Release-Steps)
### After Approval
- [ ] Tag the branch (e.g. com.ultraleap.tracking/5.9.0 and com.ultraleap.tracking.preview/5.9.0)
- [ ] Merge to main
- [ ] Crate Github Release with CI artefact for .unitypackage
- [ ] Create a GitHub Release with the CI artifact for the .unitypackage
- [ ] Resolve any public GitHub issues
- [ ] Release version on JIRA and make a new Unity Plugin NEXT version
- [ ] Merge main to develop (also add [NEXT] - unreleased to changelog)
- [ ] Announce release on various platforms
- [ ] Publish any accompanying docs

## Pull Request Templates

Switch template by going to preview and clicking the link - note it not work if you've made any changes to the description.

- [default.md](?expand=1) - for contributions to stable packages.
- [release.md](?expand=1&template=release.md) - for release merge requests.

**You are currently using: release.md**

Note: these links work by overwriting query parameters of the current url. If the current url contains any you may want to amend the url with `&template=name.md` instead of using the link. See [query parameter docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/using-query-parameters-to-create-a-pull-request) for more information.
59 changes: 59 additions & 0 deletions .github/actions/check-formatting/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Check formatting
description: Run formatting checks and write a diff artifact when changes are required

outputs:
has_diff:
description: Whether the formatting check produced a diff artifact
value: ${{ steps.result.outputs.has_diff }}

runs:
using: composite
steps:
- uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Install dotnet-format
shell: bash
run: |
set -euo pipefail
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
dotnet tool install --global dotnet-format || dotnet tool update --global dotnet-format

- name: Run dotnet-format
shell: bash
run: |
set -euo pipefail
dotnet-format -f --exclude .git Scripts Markdown

- name: Apply Copyright Year and Namespace Fixes
shell: bash
run: |
set -euo pipefail
export CURRENT_YEAR="$(date +%Y)"
find Packages -type f -name '*.cs' -print0 | xargs -0 perl -0pi -e '
s/^ \* Copyright \(C\) Ultraleap.*$/ * Copyright (C) Ultraleap, Inc. 2011-$ENV{CURRENT_YEAR}. */mg;
if (/using Leap\.Unity|namespace Leap\.Unity/) {
s/ Utils\./ Leap.Unity.Utils./g;
}
'

- name: Generate Formatting Diff
id: result
shell: bash
run: |
set -euo pipefail
diff_path="$ARTIFACTS_PATH/dotnet_format_results.diff"

mapfile -t linter_errors < <(git --no-pager diff --name-only -- '*.cs')
if ((${#linter_errors[@]})); then
printf 'Detected %s formatting issues:\n' "${#linter_errors[@]}"
printf '%s\n' "${linter_errors[@]}"
mkdir -p "$ARTIFACTS_PATH"
git diff > "$diff_path"
echo "has_diff=true" >> "$GITHUB_OUTPUT"
exit 1
else
echo "No formatting issues detected."
echo "has_diff=false" >> "$GITHUB_OUTPUT"
fi
61 changes: 61 additions & 0 deletions .github/actions/export-unitypackage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Export Unity Package
description: Generate Version.txt and export a Unity package artifact

inputs:
package_root_path:
description: Path to the package root
required: true
package_import_path:
description: Import path inside the Unity package
required: true
package_file_name:
description: File name for the generated .unitypackage
required: true
artifact_root_path:
description: Root path that will contain the generated unitypackage artifacts
required: true
package_output_path:
description: Existing output path to reuse for the generated .unitypackage directory
required: false

outputs:
package_version:
description: Exported package version
value: ${{ steps.export.outputs.package_version }}
package_output_path:
description: Output path containing the generated .unitypackage
value: ${{ steps.export.outputs.package_output_path }}

runs:
using: composite
steps:
- name: Export Unity Package
id: export
shell: pwsh
run: |
. "Scripts/ExportUnityPackage.ps1"

Export-VersionTxt "${{ inputs.package_root_path }}"

$packageVersion = Get-Content (Join-Path "${{ inputs.package_root_path }}" "Version.txt")
$packageOutputPath = "${{ inputs.package_output_path }}"
if ([string]::IsNullOrWhiteSpace($packageOutputPath)) {
$packageOutputPath = Join-Path "${{ inputs.artifact_root_path }}" "Ultraleap.UnityPlugin-$packageVersion"
}
New-Item -Path $packageOutputPath -ItemType Directory -Force | Out-Null

$unitypackageOutputPath = Join-Path $packageOutputPath "${{ inputs.package_file_name }}"

$exportErrors = $null
Export-UnityPackage `
-PackageRootPath "${{ inputs.package_root_path }}" `
-PackageImportPath "${{ inputs.package_import_path }}" `
-PackageOutputPath $unitypackageOutputPath `
-ErrorVariable exportErrors

if ($exportErrors) {
throw "Failed to generate $unitypackageOutputPath"
}

"package_version=$packageVersion" >> $env:GITHUB_OUTPUT
"package_output_path=$packageOutputPath" >> $env:GITHUB_OUTPUT
37 changes: 0 additions & 37 deletions .github/pull_request_template.md

This file was deleted.

Loading