UnityWebRequest Not Working on Quest 3 - "cannot resolve destination host" error
Hello everyone, I'm currently developing an application for the Quest 3 using Unity. I've encountered an issue where UnityWebRequest isn't functioning as expected. When I attempt to make a request, I receive the error message "cannot resolve destination host." I've tried searching for a solution on the Unity forums but couldn't find any relevant answers. Has anyone else faced a similar problem? If so, could you please share any solutions or workarounds? Any assistance would be greatly appreciated. Thank you in advance!9.1KViews0likes12CommentsHow to geometrically align a 3D model to real furniture?
For my video-see-through AR application I want a model to automatically be placed on the biggest found table surface. I achieved the first step: The model is correctly positioned at the table center. However, the orientationis not correct. I want the model to "lie down" on the table, means laying on the back, facing up, while the longest side of the model is orientated just as the longest side of the table - see the following pictures: After a very long time trying, I could not figure out how to align the model correctly. If you have any idea/hint/ or clue I could try, please let me know. Used Asset for testing: Low Poly Human I added an Empty (called ModelPlacer) where I added the script (see below) and pulled this asset in the modelInstance field. Used Meta XR Building Blocks: Camera Rig Passthrough MR Utility Kit Scene Debugger Effect Mesh Hand Tracking Controller Tracking Technical Specifications: Unity 2022.3.50f1 VR-Glasses: Meta Quest 3 Meta MR Utility Kit Code: using Meta.XR.MRUtilityKit; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ModelPlacer : MonoBehaviour { public GameObject modelPrefab; private GameObject modelInstance; void Start() { MRUK.Instance?.RegisterSceneLoadedCallback(OnSceneLoaded); } private void OnSceneLoaded() { SpawnModel(); AlignModelWithSurface(); } public void SpawnModel() { Vector3 spawnPosition = new Vector3(0.0f, 1.0f, -1.0f); modelInstance = Instantiate(modelPrefab, spawnPosition, Quaternion.identity); } public void AlignModelWithSurface() { var largestSurface = MRUK.Instance?.GetCurrentRoom()?.FindLargestSurface(MRUKAnchor.SceneLabels.TABLE); if (modelInstance != null) { if (largestSurface != null) { modelInstance.transform.SetParent(largestSurface.transform); Renderer modelRenderer = modelInstance.GetComponent<Renderer>(); modelInstance.transform.rotation = Quaternion.Euler(-90, 0, 0); Vector3 modelCenter = modelRenderer.bounds.center; Vector3 surfaceCenter = largestSurface.transform.position; Vector3 positionOffset = surfaceCenter - modelCenter; Vector3 adjustedPosition = modelInstance.transform.position + positionOffset; modelInstance.transform.position = adjustedPosition; } else { Debug.LogWarning("No surface found."); } } else { Debug.LogWarning("modelInstance is null."); } } }893Views0likes3CommentsEvent when the Headset is locked/turned off Unity
I needed to run part of a code when the headset is locked or turned off in Unity. My game is multiplayer and I need to communicate that the player has left immediately, and I can't find any way to do this. I've tried all the OVRManager actions but none of them work for locking or when I turn off the headset by pressing the power button. Does anyone know how to accomplish this?365Views0likes0CommentsEvent when the Headset is locked/turned off
I needed to run part of a code when the headset is locked or turned off. My game is multiplayer and I need to communicate that the player has left immediately, and I can't find any way to do this. I've tried all the OVRManager actions but none of them work for locking or when I turn off the headset by pressing the power button. Does anyone know how to accomplish this?419Views0likes0CommentsGetting an "Unable to open archive file" error
Hello, hope someone could help. I'm working on a Oculus Quest project where we need video files to be placed in an asset bundle which will be read from later. I've been following the "Tech Note: Expansion File with Unity" guide (you'll have to search this up as I'm unable to post links) I managed to build my asset bundles and unity is building them as obb files. I've transferred the apk and obb files over via adb. Currently I've hardcoded the bundle directory instead of using the suggested method of using the provided plugin; I wasn't sure where to place the java file and I was getting a java exception via logcat (presumably the app can't seem to execute the java file?). The Unity application loads fine; it's a scene with a ScrollRect that should get populated with the video file names that's stored in the asset bundle. However the issue is the ScrollRect doesn't get populated, and the I'm seeing an message via logcat: "unable to open archive file" and "Failed to load asset-bundle". The directory that the first error message provided is correct as I've double checked the file names. I've tried changing the compression method for my AssetBundle creation script to UncompressedAssetBundle and ForceRebuildAssetBundle as someone in the comment section suggested but that didn't seem to work either. So has anyone encountered this similar problem? Is there guide still accurate in terms of loading assets from an asset bundle? One thing to note is that when I view the headset directory with the windows explorer I can't seem to find the obb file in the Android/obb/ directory of the headset; are apk and obb files that get copied over via adb set to be hidden when trying to view them through explorer? Also I'm not sure if this is important, but I skipped the making a plugin bit under the "Read Permission" section; I wasn't able to get a Android Studio project working, but also I got the impression that I could do without it. I was able to view the manifest and ensured that I had the READ_EXTERNAL_STORAGE set. Thanks2.6KViews0likes0CommentsHow to get the information from Oculus touch analogue in C#
I am trying to figure out how to get the information from the analogue so I can register footstep sounds by the amount of which the player is moving. I don't want the steps to be inconsistent so I want the sounds to slow down or speed up depending how much the player is moving the analogue. I have no idea on how to write the code for this. Can anyone point me in the right direction?Solved1KViews0likes2CommentsNo EnableSwitch assembly reference
I am new to unity and C#. I am trying to create a simple VR world for a project i am working on for schools and I keep getting this error: Assets/Oculus/VoiceMod/Scenes/Scripts/VoiceModDemo_Logic.cs(9,9): error CS0246: The type or namespace name `EnableSwitch' could not be found. Are you missing an assembly reference?1.3KViews0likes2CommentsButton Touch State and/or Custom finger poses added to default localAvatar
Hi, I am trying to find a way to get the "button touch state" in Unity of the touch controller through code. Right now I am only seeing this available in the PC SDK section. Can someone help me out here, I would like to make custom finger poses based on whether that value is null or not? If getting the touch controllers button touch state is only available in C++ is there a way for me to ad my custom finger poses to the already default ones without disabling those? Right now a solution I had was to use the animation tool in conjunction with the grip pose scene and save those alterations out to the animator and call those animations out in script based on button presses. However this is disabling the default animations, from what I can see, when you add this to the local avatar custom pose slot. Any help would be appreciated. Thanks!1.6KViews0likes2CommentsNew libraries for using Oculus Rift in .Net applications (announcement)
If you are a .Net programmer and you have an Oculus Rift headset, then I have some great news for you. 1) I have updated the outdated .Net wrapper for Oculus SDK (OculusWrap) so that it now supports the latest version of the SDK. It can be get with full source code for free from GitHub: https://github.com/ab4d/Ab3d.OculusWrap. This means that if you know how to program with DirectX (with using SharpDX) you can now use the latest features from Oculus SDK. 2) If you do not want to work with low level Oculus SKD or do not know how to program with DirectX or OpenGL, then I would like to invite you to try the Ab3d.DXEngine. The Ab3d.DXEngine is a DirectX 11 rendering engine for desktop .Net applications. It is not another game engine where you use game editor, but is a general purpose 3D engine that allows you to build your 3D scene just as you build your 2D GUI. This makes it great for business or engineering applications that require 3D graphics. The great news is that with using Ab3d.DXEngine you can add full Oculus Rift support to your .Net application with just a few lines of code. A sample project is available on GitHub. To quickly check how easy is to define a 3D scene and add Oculus rift support, you can check the main sample file: https://github.com/ab4d/Ab3d.OculusWrap/blob/master/Ab3d.OculusWrap/Ab3d.DXEngine.OculusWrap.Sample/MainWindow.xaml.cs The following screenshot shows that the engine can easily run with great performance at 90 FPS: I hope that the added support for .Net will make the great world of real VR much closer to many .Net developers around the world. Note and disclaimer: The Ab3d.DXEngine library is a commercial library. You can get a 60-day trial from https://www.ab4d.com/Downloads.aspx. The Ab3d.OculusWrap library (.Net wrapper for Oculus SDK) is free. I am the CEO and lead developer for AB4D company that develops the Ab3d.DXEngine library.970Views0likes0Comments