Commit 8d8fa8d
committed
fix(audience-sdk): guard IsExternalInit shim against Unity 6 corlib (SDK-256)
Unity 2021.3 needs an internal IsExternalInit shim so the C# compiler can build records with
init-only properties. Unity 2022.2+ ships a compiler and corlib that include the real type, raising
CS0436 when our shim collides — and on Unity 6's IL2CPP, the linker may bind the wrong definition at
the 'with' expression sites in SetConsent/Reset, throwing MissingMethodException at runtime.
Wrap the shim in #if !UNITY_2022_2_OR_NEWER so only the toolchains that need it declare the type.1 parent 11aad56 commit 8d8fa8d
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
0 commit comments