Commit 61db47b
committed
feat(audience): add Unity integration layer and pure-C# core partition (SDK-147)
Splits the package into a core asmdef (pure C#, buildable headless
under dotnet) and a Unity sub-asmdef (engine-referencing). The
Unity layer has always belonged here; the fence on the core was
always correct; landing both together makes the partition
enforceable at Unity-compile time.
- Runtime/Unity/AudienceUnityHooks.cs: RuntimeInitializeOnLoadMethod
wiring. Flushes on pause/quit via Application hooks. Installs
Debug.Log as Log.Writer for SDK diagnostics.
- Runtime/Unity/com.immutable.audience.unity.asmdef: sibling
sub-asmdef claiming Runtime/Unity/. Excludes unsupported
platforms (mobile, consoles) per v1 scope (Windows / macOS /
Linux). Referenced from the core asmdef's sibling - not the
other way around, keeping the dependency direction clean.
- Runtime/com.immutable.audience.asmdef: noEngineReferences
flipped to true. The core has always been pure C# (proven by
the sibling Audience.Runtime.csproj that compiles the same tree
headless), but the flag shipped as Unity's Editor-default false.
Now that the Unity sub-asmdef exists to hold UnityEngine-using
code, flipping the fence makes the guarantee enforceable at
Unity-compile time - stray `using UnityEngine` in Core/,
Events/, Transport/, or Utility/ now breaks the Unity build,
matching what dotnet already rejects.
- Audience.Runtime.csproj: comment now cross-references the
asmdef flag as the primary portability fence and the Compile
Remove as the sibling check for the headless dotnet build.
Prevents a future cleanup from removing one of the two halves.1 parent 5aefd17 commit 61db47b
4 files changed
Lines changed: 43 additions & 1 deletion
File tree
- src/Packages/Audience/Runtime
- Unity
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
0 commit comments