Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contextual boundary #761

Merged
merged 4 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
cache: Android_Vulkan
extraoptions: -btb-il2cpp
versionSuffix: 1
extra_defines: OCULUS_SUPPORTED USE_QUEST_PACKAGE_NAME ENABLE_BOUNDARYLESS_APP
extra_defines: OCULUS_SUPPORTED USE_QUEST_PACKAGE_NAME ENABLE_CONTEXTUAL_BOUNDARYLESS_APP

- name: Android Pico
targetPlatform: Android
Expand Down
6 changes: 3 additions & 3 deletions Assets/Editor/BuildTiltBrushPostProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ public void OnPostGenerateGradleAndroidProject(string path)
);
#endif

#if ENABLE_BOUNDARYLESS_APP
UnityEngine.Debug.Log("Add com.oculus.feature.BOUNDARYLESS_APP");
#if ENABLE_CONTEXTUAL_BOUNDARYLESS_APP
UnityEngine.Debug.Log("Add com.oculus.feature.CONTEXTUAL_BOUNDARYLESS_APP");
AddOrRemoveTag(doc,
androidNamespaceURI,
"/manifest",
"uses-feature",
"com.oculus.feature.BOUNDARYLESS_APP",
"com.oculus.feature.CONTEXTUAL_BOUNDARYLESS_APP",
andybak marked this conversation as resolved.
Show resolved Hide resolved
true,
true,
"required", "true"
Expand Down
8 changes: 8 additions & 0 deletions Assets/Scripts/PassthroughManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ void Start()
#if OCULUS_SUPPORTED
var passthrough = gameObject.AddComponent<OVRPassthroughLayer>();
passthrough.overlayType = OVROverlay.OverlayType.Underlay;
App.VrSdk.m_OvrManager.shouldBoundaryVisibilityBeSuppressed = true;
#endif // OCULUS_SUPPORTED
}

void OnDestroy()
{
#if OCULUS_SUPPORTED
App.VrSdk.m_OvrManager.shouldBoundaryVisibilityBeSuppressed = false;
#endif
}
}
}
12 changes: 7 additions & 5 deletions Assets/Scripts/VrSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public class VrSdk : MonoBehaviour
// out of date for a frame when controllers change.
private VrControllers m_VrControls;
public VrControllers VrControls { get { return m_VrControls; } }

#if OCULUS_SUPPORTED
[NonSerialized] public OVRManager m_OvrManager;
#endif
private bool m_HasVrFocus = true;

private Bounds? m_RoomBoundsAabbCached;
Expand Down Expand Up @@ -204,10 +206,10 @@ void Awake()
// ---------------------------------------------------------------------------------------- //
// OculusVR
// ---------------------------------------------------------------------------------------- //
OVRManager manager = gameObject.AddComponent<OVRManager>();
manager.trackingOriginType = OVRManager.TrackingOrigin.Stage;
manager.useRecommendedMSAALevel = false;
manager.isInsightPassthroughEnabled = true;
m_OvrManager = gameObject.AddComponent<OVRManager>();
m_OvrManager.trackingOriginType = OVRManager.TrackingOrigin.Stage;
m_OvrManager.useRecommendedMSAALevel = false;
m_OvrManager.isInsightPassthroughEnabled = true;

// adding components to the VR Camera needed for fading view and getting controller poses.
m_VrCamera.gameObject.AddComponent<OculusCameraFade>();
Expand Down