Skip to content

fix(audience): keep package meta-complete for git-URL installs#795

Merged
nattb8 merged 1 commit into
mainfrom
feat/sdk-496-audience-package-meta-files
Jun 16, 2026
Merged

fix(audience): keep package meta-complete for git-URL installs#795
nattb8 merged 1 commit into
mainfrom
feat/sdk-496-audience-package-meta-files

Conversation

@nattb8

@nattb8 nattb8 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Problem

Studios installing the Audience SDK by git URL hit a fatal iOS build failure: Error building Player: 9 errors. The cause is that a git-URL install copies the package into Unity's immutable PackageCache verbatim, and Unity drops any file that has no .meta companion. The package was shipping four non-Unity files whose .meta files are deliberately gitignored repo-wide (Directory.Build.props, the two headless-test .csproj files, and README.md), so on device builds Unity treated each as a fatal error.

This never surfaced in our own testing because the sample app references the package by file: path, which Unity treats as mutable and tolerates.

Fix

The three .csproj / Directory.Build.props files are repo-internal dotnet tooling that consumers never need, so the real fix is to keep them out of the published package entirely. They now live in src/Audience.Build/ and compile the package sources via relative globs, which keeps the headless unit-test workflow working while leaving the package clean. README.md should stay (the Package Manager UI displays it), so its .meta is now committed.

To stop this regressing, a CI check fails any PR that reintroduces a missing .meta or a non-Unity tooling file under the package.

Verification

  • Headless unit tests pass against the relocated projects (dotnet test src/Audience.Build/Audience.Tests).
  • The new guard passes on this branch and fails when a .csproj or meta-less asset is reintroduced under the package.

🤖 Generated with Claude Code

@nattb8 nattb8 requested review from a team as code owners June 16, 2026 04:03
@nattb8 nattb8 force-pushed the feat/sdk-496-audience-package-meta-files branch from bdd0a49 to 61089ff Compare June 16, 2026 04:25
When the Audience package is installed from a git URL, Unity copies the
folder into an immutable PackageCache verbatim. Any file without a .meta
companion is dropped, which is a fatal error on device builds. The package
shipped four non-Unity files (Directory.Build.props, two .csproj, README.md)
whose .meta files are intentionally gitignored, so iOS builds failed.

Move the headless dotnet build projects to src/Audience.Build so they never
ship to consumers, and commit README.md.meta so the README keeps its meta.
A CI check now fails any PR that reintroduces a missing meta or a non-Unity
tooling file under the package.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nattb8 nattb8 force-pushed the feat/sdk-496-audience-package-meta-files branch from 61089ff to 12ae4a1 Compare June 16, 2026 04:39
@nattb8 nattb8 merged commit 6b4937f into main Jun 16, 2026
49 of 56 checks passed
@nattb8 nattb8 deleted the feat/sdk-496-audience-package-meta-files branch June 16, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants