Skip to content

Commit a1e47a4

Browse files
ryzngardGitHub Enterprise
authored andcommitted
Trying to reconstruct missing AppleSpatialControllerBuildStep.cs (apple#85)
2 parents b3e178c + d1630aa commit a1e47a4

12 files changed

Lines changed: 128 additions & 35 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
using Apple.Core;
2+
using System;
3+
using System.Collections.Generic;
4+
using UnityEditor;
5+
using UnityEngine;
6+
7+
#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS))
8+
using UnityEditor.iOS.Xcode;
9+
#endif
10+
11+
namespace Apple.SpatialController.Editor
12+
{
13+
public class AppleSpatialControllerBuildStep : AppleBuildStep
14+
{
15+
public bool GCSupportsControllerUserInteraction => true;
16+
public bool SupportsSpatialGamePad => true;
17+
18+
public override string DisplayName => "Apple.SpatialController";
19+
public override BuildTarget[] SupportedTargets => new BuildTarget[] { BuildTarget.VisionOS };
20+
#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS))
21+
public override void OnProcessInfoPlist(AppleBuildProfile _, BuildTarget buildTarget, string pathToBuiltTarget, PlistDocument infoPlist)
22+
{
23+
// Notify that we support controllers
24+
infoPlist.root.SetBoolean("GCSupportsControllerUserInteraction", GCSupportsControllerUserInteraction);
25+
26+
if (!GCSupportsControllerUserInteraction)
27+
return;
28+
29+
// Support device profiles
30+
PlistElementArray supportedControllers = null;
31+
32+
if (buildTarget == BuildTarget.iOS || buildTarget == BuildTarget.StandaloneOSX || buildTarget == BuildTarget.VisionOS)
33+
{
34+
supportedControllers = infoPlist.root.CreateArray("GCSupportedGameControllers");
35+
}
36+
else if (buildTarget == BuildTarget.tvOS)
37+
{
38+
supportedControllers = infoPlist.root["GCSupportedGameControllers"].AsArray();
39+
}
40+
41+
if (SupportsSpatialGamePad)
42+
{
43+
var newController = new PlistElementDict();
44+
newController.SetString("ProfileName", "SpatialGamepad");
45+
supportedControllers.values.Add(newController);
46+
}
47+
}
48+
49+
public override void OnProcessFrameworks(AppleBuildProfile _, BuildTarget buildTarget, string generatedProjectPath, PBXProject pbxProject)
50+
{
51+
if (Array.IndexOf(SupportedTargets, buildTarget) > -1)
52+
{
53+
AppleNativeLibraryUtility.ProcessWrapperLibrary(DisplayName, buildTarget, generatedProjectPath, pbxProject);
54+
AppleNativeLibraryUtility.AddPlatformFrameworkDependency("SpatialController.framework", false, buildTarget, pbxProject);
55+
}
56+
else
57+
{
58+
Debug.LogWarning($"[{DisplayName}] No native library defined for Unity build target {buildTarget.ToString()}. Skipping.");
59+
}
60+
}
61+
#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS))
62+
}
63+
}

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Assets/Apple.SpatialController/Apple/Editor/AppleSpatialControllerBuildStep.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Assets/Apple.SpatialController/Apple/Editor/apple.accessorytracking.Editor.asmdef

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "apple.accessorytracking.Editor",
33
"rootNamespace": "",
44
"references": [
5-
"GUID:ba36ca5f0f3ef4f5088c4db4d992d728"
5+
"GUID:ba36ca5f0f3ef4f5088c4db4d992d728",
6+
"Apple.Core",
7+
"Apple.Core.Editor"
68
],
79
"includePlatforms": [
810
"Editor"

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Assets/Settings/Mobile_RPAsset.asset

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ MonoBehaviour:
131131
m_PrefilterNativeRenderPass: 1
132132
m_PrefilterUseLegacyLightmaps: 0
133133
m_PrefilterBicubicLightmapSampling: 1
134+
m_PrefilterReflectionProbeBlending: 0
135+
m_PrefilterReflectionProbeBoxProjection: 0
136+
m_PrefilterReflectionProbeAtlas: 1
134137
m_ShaderVariantLogLevel: 0
135138
m_ShadowCascades: 0
136139
m_Textures:

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Assets/Settings/PC_RPAsset.asset

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ MonoBehaviour:
131131
m_PrefilterNativeRenderPass: 1
132132
m_PrefilterUseLegacyLightmaps: 0
133133
m_PrefilterBicubicLightmapSampling: 1
134+
m_PrefilterReflectionProbeBlending: 0
135+
m_PrefilterReflectionProbeBoxProjection: 0
136+
m_PrefilterReflectionProbeAtlas: 0
134137
m_ShaderVariantLogLevel: 0
135138
m_ShadowCascades: 0
136139
m_Textures:

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ MonoBehaviour:
6161
- rid: 2165422336102367237
6262
- rid: 2165422336102367238
6363
- rid: 2165422336102367239
64+
- rid: 4568216016700309698
6465
m_RuntimeSettings:
6566
m_List:
6667
- rid: 6852985685364965378
@@ -75,6 +76,7 @@ MonoBehaviour:
7576
- rid: 2165422336102367233
7677
- rid: 2165422336102367235
7778
- rid: 2165422336102367236
79+
- rid: 2165422336102367238
7880
- rid: 2165422336102367239
7981
m_AssetVersion: 8
8082
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
@@ -235,6 +237,10 @@ MonoBehaviour:
235237
- {r: 0.5, g: 0, b: 0.5, a: 1}
236238
- {r: 0.5, g: 0.5, b: 0.5, a: 1}
237239
- {r: 0, g: 0, b: 1, a: 1}
240+
- rid: 4568216016700309698
241+
type: {class: RenderingDebuggerRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
242+
data:
243+
m_version: 0
238244
- rid: 6852985685364965376
239245
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
240246
data:
@@ -248,9 +254,6 @@ MonoBehaviour:
248254
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
249255
m_AutodeskInteractiveTransparent: {fileID: 4800000, guid: 5c81372d981403744adbdda4433c9c11, type: 3}
250256
m_AutodeskInteractiveMasked: {fileID: 4800000, guid: 80aa867ac363ac043847b06ad71604cd, type: 3}
251-
m_TerrainDetailLit: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3}
252-
m_TerrainDetailGrassBillboard: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3}
253-
m_TerrainDetailGrass: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3}
254257
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
255258
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
256259
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Packages/manifest.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"dependencies": {
3-
"com.unity.ai.navigation": "2.0.8",
4-
"com.unity.collab-proxy": "2.8.2",
5-
"com.unity.ide.rider": "3.0.36",
3+
"com.apple.unityplugin.core": "file:../../../Apple.Core/Apple.Core_Unity/Assets/Apple.Core",
4+
"com.unity.ai.navigation": "2.0.9",
5+
"com.unity.collab-proxy": "2.9.3",
6+
"com.unity.ide.rider": "3.0.38",
67
"com.unity.ide.visualstudio": "2.0.23",
7-
"com.unity.inputsystem": "1.14.0",
8+
"com.unity.inputsystem": "1.14.2",
89
"com.unity.multiplayer.center": "1.0.0",
910
"com.unity.polyspatial.visionos": "2.3.1",
10-
"com.unity.render-pipelines.universal": "17.1.0",
11-
"com.unity.test-framework": "1.5.1",
12-
"com.unity.timeline": "1.8.7",
11+
"com.unity.render-pipelines.universal": "17.2.0",
12+
"com.unity.test-framework": "1.6.0",
13+
"com.unity.timeline": "1.8.9",
1314
"com.unity.ugui": "2.0.0",
1415
"com.unity.visualscripting": "1.9.7",
1516
"com.unity.xr.visionos": "2.3.1",

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/Packages/packages-lock.json

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"dependencies": {
3+
"com.apple.unityplugin.core": {
4+
"version": "file:../../../Apple.Core/Apple.Core_Unity/Assets/Apple.Core",
5+
"depth": 0,
6+
"source": "local",
7+
"dependencies": {}
8+
},
39
"com.unity.ai.navigation": {
4-
"version": "2.0.8",
10+
"version": "2.0.9",
511
"depth": 0,
612
"source": "registry",
713
"dependencies": {
@@ -10,7 +16,7 @@
1016
"url": "https://packages.unity.com"
1117
},
1218
"com.unity.burst": {
13-
"version": "1.8.23",
19+
"version": "1.8.24",
1420
"depth": 2,
1521
"source": "registry",
1622
"dependencies": {
@@ -20,20 +26,21 @@
2026
"url": "https://packages.unity.com"
2127
},
2228
"com.unity.collab-proxy": {
23-
"version": "2.8.2",
29+
"version": "2.9.3",
2430
"depth": 0,
2531
"source": "registry",
2632
"dependencies": {},
2733
"url": "https://packages.unity.com"
2834
},
2935
"com.unity.collections": {
30-
"version": "2.5.1",
36+
"version": "2.5.7",
3137
"depth": 2,
3238
"source": "registry",
3339
"dependencies": {
34-
"com.unity.burst": "1.8.17",
35-
"com.unity.test-framework": "1.4.5",
36-
"com.unity.nuget.mono-cecil": "1.11.4",
40+
"com.unity.burst": "1.8.19",
41+
"com.unity.mathematics": "1.3.2",
42+
"com.unity.test-framework": "1.4.6",
43+
"com.unity.nuget.mono-cecil": "1.11.5",
3744
"com.unity.test-framework.performance": "3.0.3"
3845
},
3946
"url": "https://packages.unity.com"
@@ -59,7 +66,7 @@
5966
"dependencies": {}
6067
},
6168
"com.unity.ide.rider": {
62-
"version": "3.0.36",
69+
"version": "3.0.38",
6370
"depth": 0,
6471
"source": "registry",
6572
"dependencies": {
@@ -77,7 +84,7 @@
7784
"url": "https://packages.unity.com"
7885
},
7986
"com.unity.inputsystem": {
80-
"version": "1.14.0",
87+
"version": "1.14.2",
8188
"depth": 0,
8289
"source": "registry",
8390
"dependencies": {
@@ -101,7 +108,7 @@
101108
}
102109
},
103110
"com.unity.nuget.mono-cecil": {
104-
"version": "1.11.4",
111+
"version": "1.11.5",
105112
"depth": 3,
106113
"source": "registry",
107114
"dependencies": {},
@@ -161,7 +168,7 @@
161168
"url": "https://packages.unity.com"
162169
},
163170
"com.unity.render-pipelines.core": {
164-
"version": "17.1.0",
171+
"version": "17.2.0",
165172
"depth": 1,
166173
"source": "builtin",
167174
"dependencies": {
@@ -176,12 +183,12 @@
176183
}
177184
},
178185
"com.unity.render-pipelines.universal": {
179-
"version": "17.1.0",
186+
"version": "17.2.0",
180187
"depth": 0,
181188
"source": "builtin",
182189
"dependencies": {
183-
"com.unity.render-pipelines.core": "17.1.0",
184-
"com.unity.shadergraph": "17.1.0",
190+
"com.unity.render-pipelines.core": "17.2.0",
191+
"com.unity.shadergraph": "17.2.0",
185192
"com.unity.render-pipelines.universal-config": "17.0.3"
186193
}
187194
},
@@ -211,16 +218,16 @@
211218
"url": "https://packages.unity.com"
212219
},
213220
"com.unity.shadergraph": {
214-
"version": "17.1.0",
221+
"version": "17.2.0",
215222
"depth": 1,
216223
"source": "builtin",
217224
"dependencies": {
218-
"com.unity.render-pipelines.core": "17.1.0",
225+
"com.unity.render-pipelines.core": "17.2.0",
219226
"com.unity.searcher": "4.9.3"
220227
}
221228
},
222229
"com.unity.test-framework": {
223-
"version": "1.5.1",
230+
"version": "1.6.0",
224231
"depth": 0,
225232
"source": "builtin",
226233
"dependencies": {
@@ -248,7 +255,7 @@
248255
}
249256
},
250257
"com.unity.timeline": {
251-
"version": "1.8.7",
258+
"version": "1.8.9",
252259
"depth": 0,
253260
"source": "registry",
254261
"dependencies": {
@@ -260,7 +267,7 @@
260267
"url": "https://packages.unity.com"
261268
},
262269
"com.unity.transport": {
263-
"version": "2.5.2",
270+
"version": "2.5.3",
264271
"depth": 2,
265272
"source": "registry",
266273
"dependencies": {
@@ -290,7 +297,7 @@
290297
"url": "https://packages.unity.com"
291298
},
292299
"com.unity.xr.arfoundation": {
293-
"version": "6.1.1",
300+
"version": "6.2.0",
294301
"depth": 1,
295302
"source": "registry",
296303
"dependencies": {
@@ -308,7 +315,7 @@
308315
"url": "https://packages.unity.com"
309316
},
310317
"com.unity.xr.core-utils": {
311-
"version": "2.5.2",
318+
"version": "2.5.3",
312319
"depth": 1,
313320
"source": "registry",
314321
"dependencies": {
@@ -511,7 +518,8 @@
511518
"com.unity.modules.ui": "1.0.0",
512519
"com.unity.modules.imgui": "1.0.0",
513520
"com.unity.modules.jsonserialize": "1.0.0",
514-
"com.unity.modules.hierarchycore": "1.0.0"
521+
"com.unity.modules.hierarchycore": "1.0.0",
522+
"com.unity.modules.physics": "1.0.0"
515523
}
516524
},
517525
"com.unity.modules.umbra": {

plug-ins/Apple.SpatialController/Apple.SpatialController_Unity/ProjectSettings/ProjectSettings.asset

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ PlayerSettings:
8686
muteOtherAudioSources: 0
8787
Prepare IOS For Recording: 0
8888
Force IOS Speakers When Recording: 0
89+
audioSpatialExperience: 0
8990
deferSystemGesturesMode: 0
9091
hideHomeButton: 0
9192
submitAnalytics: 1
@@ -132,6 +133,7 @@ PlayerSettings:
132133
switchNVNMaxPublicSamplerIDCount: 0
133134
switchMaxWorkerMultiple: 8
134135
switchNVNGraphicsFirmwareMemory: 32
136+
switchGraphicsJobsSyncAfterKick: 1
135137
vulkanNumSwapchainBuffers: 3
136138
vulkanEnableSetSRGBWrite: 0
137139
vulkanEnablePreTransform: 1
@@ -277,6 +279,9 @@ PlayerSettings:
277279
AndroidBuildApkPerCpuArchitecture: 0
278280
AndroidTVCompatibility: 0
279281
AndroidIsGame: 1
282+
androidAppCategory: 3
283+
useAndroidAppCategory: 1
284+
androidAppCategoryOther:
280285
AndroidEnableTango: 0
281286
androidEnableBanner: 1
282287
androidUseLowAccuracyLocation: 0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 6000.1.14f1
2-
m_EditorVersionWithRevision: 6000.1.14f1 (db7aa045cc2c)
1+
m_EditorVersion: 6000.2.6f2
2+
m_EditorVersionWithRevision: 6000.2.6f2 (4a4dcaec6541)

0 commit comments

Comments
 (0)