fix(audience): keep package meta-complete for git-URL installs#795
Merged
Conversation
bdd0a49 to
61089ff
Compare
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>
61089ff to
12ae4a1
Compare
bkbooth
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 immutablePackageCacheverbatim, and Unity drops any file that has no.metacompanion. The package was shipping four non-Unity files whose.metafiles are deliberately gitignored repo-wide (Directory.Build.props, the two headless-test.csprojfiles, andREADME.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.propsfiles 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 insrc/Audience.Build/and compile the package sources via relative globs, which keeps the headless unit-test workflow working while leaving the package clean.README.mdshould stay (the Package Manager UI displays it), so its.metais now committed.To stop this regressing, a CI check fails any PR that reintroduces a missing
.metaor a non-Unity tooling file under the package.Verification
dotnet test src/Audience.Build/Audience.Tests)..csprojor meta-less asset is reintroduced under the package.🤖 Generated with Claude Code