Skip to content

Commit 08b86d1

Browse files
committed
Add defineConstraints to defer compilation until dependencies are installed
The Runtime assembly (Ubiq.Genie) uses versionDefines/defineConstraints to skip compilation until both com.ucl.ubiq and com.unity.webrtc-ubiq-fork are present. The PostInstall editor assembly does the same for com.ucl.ubiq. This prevents compilation errors on first UPM import, before the AddDependencies script has had a chance to install Ubiq.
1 parent febd410 commit 08b86d1

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

Unity/Assets/Ubiq-Genie/Editor/PostInstall/Ubiq.Genie.Editor.PostInstall.asmdef

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
"overrideReferences": false,
1313
"precompiledReferences": [],
1414
"autoReferenced": true,
15-
"defineConstraints": [],
16-
"versionDefines": [],
15+
"defineConstraints": [
16+
"UBIQ_GENIE_HAS_UBIQ"
17+
],
18+
"versionDefines": [
19+
{
20+
"name": "com.ucl.ubiq",
21+
"expression": "",
22+
"define": "UBIQ_GENIE_HAS_UBIQ"
23+
}
24+
],
1725
"noEngineReferences": false
1826
}

Unity/Assets/Ubiq-Genie/Runtime/Ubiq.Genie.asmdef

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,21 @@
1111
"overrideReferences": false,
1212
"precompiledReferences": [],
1313
"autoReferenced": true,
14-
"defineConstraints": [],
15-
"versionDefines": [],
14+
"defineConstraints": [
15+
"UBIQ_GENIE_HAS_UBIQ",
16+
"UBIQ_GENIE_HAS_WEBRTC"
17+
],
18+
"versionDefines": [
19+
{
20+
"name": "com.ucl.ubiq",
21+
"expression": "",
22+
"define": "UBIQ_GENIE_HAS_UBIQ"
23+
},
24+
{
25+
"name": "com.unity.webrtc-ubiq-fork",
26+
"expression": "",
27+
"define": "UBIQ_GENIE_HAS_WEBRTC"
28+
}
29+
],
1630
"noEngineReferences": false
1731
}

0 commit comments

Comments
 (0)