Building custom code upon Building Blocks
Hello Community, I want to implement my own functionalities on top of functionalities the Building Blocks are providing. How is that possible? And what is the best way? For example: I added the "Spatial Anchor Core" Building Block. Now, I want to use the method "InstantiateSpatialAnchor()" the script attached to the Building Block is providing, in a own script.314Views0likes0CommentsShare Spatial Anchor on custom app
I'm working on a VR experience that requires all the users be on the same physical room. I've managed to get working an OVRSpatialAnchor and save it locally for later sessions. I can calibrate the VR room to match the real life room using that anchor, save the anchor and load it for repositioning the content aligned to the real world. I'm using Photon as network solution and I can have all the users on the same room. Al works fine there. The problem is: I would like do the room calibration using only one headset and then share that anchor to other users in order to avoid calibrate the room again and again for the same session. Other users could get that anchor and automatic get the content aligned, ready to play. I've created the app on the Oculus developer dashboard, and I've requested permissions to handle user ID and User Profile on that app, it's approved. So, the next steps are confused to me, should I add every headset user to the users list on the app in order to share the anchor? If not, whats the next step? Also I can't figure the code for share , broadcast and Load that anchor on the other users headset. "The Big Picture" (https://developer.oculus.com/documentation/unity/unity-shared-spatial-anchors/?intern_source=devblog&intern_content=build-local-multiplayer-experiences-shared-spatial-anchors#the-big-picture) steps are barely specific about that.Please, any help will be very appreciated. Thanks.1.1KViews0likes0CommentsPassthrough and other functionalities broken on v57
So I was updating a project in unity to the v57 and all the passthrough functionalities broke. Im trying the default Passthrough scene and even that one doesnt work. Also the spatial anchors doesn't work neither. Even a new empty project with the oculus integration package doesn't work the example scenes of Passthrough or spatial anchors. Any idea on how to solve it?851Views0likes0CommentsProblems with Spatial Anchors
Hello, I've been having some issues for quite a while with spatial anchors. I tried to dabble with them some months ago with little success and now I'm trying again. I've had very inconsistent result with the samples where sometimes they work and other times I can't even place the anchor. In my code all I want to do for now is call this function to place the anchor: public void PlaceLeftAnchor(Vector3 position, Quaternion rotation) { SpatialAnchor anchor = Instantiate(m_AnchorPrefab.GetComponent<SpatialAnchor>(), position, rotation); anchor.SaveAnchorLocally(); } and here is the SpatialAnchor code based on the oculus samples: using System.Collections; using UnityEngine; [RequireComponent(typeof(OVRSpatialAnchor))] public class SpatialAnchor : MonoBehaviour { [SerializeField] private OVRSpatialAnchor m_SpatialAnchor = null; public string Uuid { get => m_Uuid; } private string m_Uuid = ""; private IEnumerator Start() { while (m_SpatialAnchor && !m_SpatialAnchor.Created) { yield return null; } Debug.LogError($"Achor created. Enabled?: {m_SpatialAnchor.enabled}"); } public void SaveAnchorLocally() { Logger.Instance.LogError($"Saving anchor start. Status of anchor component: {m_SpatialAnchor == null} / {m_SpatialAnchor.enabled}"); m_SpatialAnchor.Save((anchor, success) => { // --> Never reaches this part <-- }); Logger.Instance.LogError($"End of Save Anchor"); } } I don't manage to receive a callback within the m_SpatialAnchor.Save function and that seems to be the case due to the spatial anchor self-destructing itself. I get this error: As a side note, I noticed that the anchors weren't working in the samples, until I added this line (<uses-permission android:name="com.oculus.permission.USE_ANCHOR_API" />) to the manifest. Now I was able to place and save the samples, but that wasn't enough to fix my own implementation. Perhaps I am missing more permissions? If would greatly appreciate anyone who could provide insights or their own working example of a spatial anchor implementation.2.3KViews0likes1CommentShare Spatial Anchor between devices
Hello everyone, I'm building an app that 2 person with 2 headset could manage the same virtual object in mixed reality with passthrough and the 2 person are local so the object have to be align and in the right place in real world. The main issue I have right now is that I need the object be in same position referred to the real world because the user are in the same real room in passhtrough. I thought to use Spatial Anchor but I have to do that sharable trough device, it could be possible? Someone have tips or my way to think it's completely wrong?2.3KViews0likes2Comments