Repository navigation
fix: [SDK-5671] add missing InputGuard.cs.meta to core package - #910
Conversation
Unity ignores assets without a .meta in immutable UPM packages, so InputGuard was dropped and the Android/iOS packages failed to compile. Also validate in CI that every package asset ships with a .meta. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abdulraqeeb33
left a comment
There was a problem hiding this comment.
The InputGuard meta is the right fix for the missing file, and a tracked script with no meta now fails the validator. Three gaps are still open.
- The publish job never runs the validator, and
maindoes not requiretest. A package-local.gitignoreof*.metaalso leaves the validator green whilenpm packomits the meta. - Any file named
{asset}.metapasses, including an empty file or one with no guid. Unity ignores that asset in an immutable package. - core 5.4.1 and 5.4.2 on npm ship
InputGuard.cswithout the meta, and android and ios 5.4.2 depend on that core. This branch stays on 5.4.2, so publish will skip.
Before publish, validate npm pack --dry-run: every packed asset needs a packed meta with a unique 32-hex guid. Then release a new core, android, and ios version together.
Check the npm pack file list instead of git, require a unique guid in every .meta, and run the validator in the publish job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, good catches.
|
abdulraqeeb33
left a comment
There was a problem hiding this comment.
The three gaps from the last review are fixed. Pack listing, guid checks, and the publish job all fail closed on the cases that dropped InputGuard. Approving.
Nits, not blockers: require a single guid line and accept A-F, check packed metas that have no asset, and add a fixture so CI fails if this script is weakened. 5.4.1 and 5.4.2 on npm stay broken until the 5.4.3 release.
Description
One Line Summary
Add the missing
InputGuard.cs.metato the core package and check in CI that every package asset has a.meta.Details
Motivation
Fixes #909. #901 added
com.onesignal.unity.core/Runtime/InputGuard.cswithout its.meta. Unity can't write.metafiles into installed UPM packages, so it ignoredInputGuard.cs, and the Android/iOS packages failed withCS0103: The name 'InputGuard' does not exist. This affects 5.4.1 and later.The demo didn't catch it because it references the packages with
file:paths, which are editable, so Unity generated the.metalocally.Scope
InputGuard.cs.metawas generated by Unity 6000.4.11f1 when it importedexamples/demo.validate-unity-distribution.pynow checks each package'snpm pack --dry-runfile list. Every file and folder Unity imports needs a packed.metawith a unique 32-hex guid. Paths Unity ignores (a leading.or a trailing~) are skipped.cd.ymlruns the validator beforenpm publish.Testing
Manual testing
.npmignoreof*.meta.mainfails Android/iOS player compile withCS0103: The name 'InputGuard' does not exist; this branch compiles both.examples/demo: no compile errors.Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code