Having Trouble Consuming IAP I do it and it doesnt work
Hello so i am having issues trying to consume a IAP consumable sku even though i can purchase it once but cant consume it and cant figure out the issue because debugging is hard on Meta Quest Heres the code: using Oculus.Platform; using Oculus.Platform.Models; using UnityEngine; using PlayFab; using PlayFab.ClientModels; using TMPro; public class PlayFabShopManager : MonoBehaviour { [SerializeField] private string skuToPurchase; [SerializeField] private int currencyAmount; [SerializeField] private CosmeticsManager CM; public TextMeshPro ErrorTest; private string[] skus = { "1000Nanas", "2500Nanas", "5000Nanas" }; void Awake() { Oculus.Platform.Core.Initialize(); } void Start() { GetPrices(); GetPurchases(); } private void GetPrices() { IAP.GetProductsBySKU(skus).OnComplete(GetPricesCallback); } private void GetPricesCallback(Message<ProductList> msg) { if (msg.IsError) return; } private void GetPurchases() { IAP.GetViewerPurchases().OnComplete(GetPurchasesCallback); } private void GetPurchasesCallback(Message<PurchaseList> msg) { if (msg.IsError) return; } public void BuyProduct() { IAP.LaunchCheckoutFlow(skuToPurchase).OnComplete(BuyProductCallback); } private void BuyProductCallback(Message<Oculus.Platform.Models.Purchase> msg) { if (msg.IsError) return; IAP.ConsumePurchase(skuToPurchase).OnComplete(ConsumePurchaseCallback); } private void ConsumePurchaseCallback(Message msg) { if (!msg.IsError) { var request = new AddUserVirtualCurrencyRequest { Amount = currencyAmount, VirtualCurrency = "HS" }; ErrorTest.text = msg.ToString(); PlayFabClientAPI.AddUserVirtualCurrency(request, OnAddCurrencySuccess, OnAddCurrencyFailure); } else { ErrorTest.text = msg.ToString(); Debug.Log("Error Consuming Purchase" + msg); } } private void OnAddCurrencySuccess(ModifyUserVirtualCurrencyResult result) { Debug.Log("Currency added: " + result.Balance); Playfablogin.instance.GetVirtualCurrencies(); } private void OnAddCurrencyFailure(PlayFabError error) { Debug.LogError("Failed to add currency: " + error.ErrorMessage); } private void OnTriggerEnter(Collider other) { if (other.CompareTag("HandTag")) { BuyProduct(); Playfablogin.instance.GetVirtualCurrencies(); } } }601Views0likes0CommentsCorrect way to pause game when headset removed / Dash up?
Hi! I am working on a VR application and I need to meet VR.PC.Functional.3. I am testing this in a simple Menu Scene I designed, and it only works partially. When I hit the Oculus button to return to the Dash, the app pauses. Hitting that button again returns the game correctly. However, upon removal of the headset and putting it back on, the OVRCameraRig never begins rendering again. I looked at the component in the inspector while this problem is occurring, and it appears the the OVRCameraRig never was SetActive(true) again. Can anyone help or give me their code that works? Thanks in advance, PicoPlanet Developing Below is my pause script, attached to a separate gameobject: using System.Collections; using System.Collections.Generic; using UnityEngine; public class MenuPauseControl : MonoBehaviour { public GameObject OVRCameraRig; public GameObject Canvas; public GameObject EventSystem; void Start() { } void Update() { if (OVRManager.hasInputFocus && OVRManager.hasVrFocus) { ContinueGame(); } else { PauseGame(); } } private void PauseGame() { Time.timeScale = 0; //Disable stuff that still work while timescale is set to 0 OVRCameraRig.SetActive(false); Canvas.SetActive(false); EventSystem.SetActive(false); } private void ContinueGame() { Time.timeScale = 1; //enable the stuff again OVRCameraRig.SetActive(true); Canvas.SetActive(true); EventSystem.SetActive(true); } } and here's my hierarchy: Any help / code would be greatly appreciated!6.3KViews0likes6CommentsCan I link my Quest 2 to the Oculus App on PC with a non-supported GPU for development in Unity?
I understand that the Oculus app for PC requires newer, more powerful GPUs in order to link the Quest 2 for PCVR games, however I need to link the Quest 2 to my PC for the purpose of development of a school project in Unity. I'm borrowing the Quest 2 from my school, so I didn't know that it would require such GPUs. From a couple tutorials I've watched, the easiest way to test a playable version of the project that I'm building in Unity is to link the Quest 2 to my PC via a link cable. I've already spent a bit of time setting up and developing my project in Unity, and now I'd like to test if the XR interaction and other elements in my project actually work with the headset. The problem is that my Quest 2 can't link to my PC app, because I have an older laptop with an outdated GPU(NVIDIA GeForce MX150), but my processor should be compatible(Intel Core i5-8250U[8th gen]). I don't actually want to link the Quest 2 to the PC app for any other reason than for my Unity to recognize/use the Quest 2 as the run device. From my understanding, the reason it only lets the Quest 2 pair with newer, more powerful GPUs is so that it can run PCVR games without any problems, but I only want to link it to test my Unity project. I think there is a way to build the project and then move it onto the Quest 2 without the need of a link cable, but that would waste time during production and I'm not totally sure how to do it. Is there any way to link the Quest 2 to the Oculus app on PC just for the sake of development? If not, can anyone point me to any resources to bypass the Oculus app for PC and still be able to test my Unity project?2.1KViews0likes3CommentsDeveloper Distribution Agreement?
Hello, I have developing a game with Unity Engine for Oculus Rift S. When I use OVR Platform tools i get a error message (SS1) that tells me i have to agree developer distribution agreement but i couldn't find such a thing. Could you help me? SS1 unity 2019.4.1f1 Ovr plugin 1.52.14.1KViews0likes7CommentsWeird performance issue on Oculus Quest 2 Unity build
Hi, maybe im doing something painfuly wrong and obvious but im just not seeing it yet. What is currently happening is that an APK that worked on my previous oculus 1 in wich the game run good is now facing serious performance issues. The same game nothing has changed. The only this that has changed is the headset. In summary the build on the Oculus quest 2. Now runs at 1 FPS MAX and then proceeds to crash. And this is obviously something wrong with a setting or something that will make the build run fine on the oculus quest 2. But im just to much of a newby to see it. Btw the headset is fine. I have tried playing others standalone games on the quest and there is nothing wrong on that side. Another btw im on Unity 2019.4.25f11.3KViews0likes0CommentsUnity Desktop: uDesktopDuplication + Oculus Quest 2
As you can see in the video I have to get quite close to the Screens to be able to read the text. I don't know what causes this flickering but when I get back to the normal distance then all the text gets constantly cut into parts. I don't know a better way to describe it. Probably I just messed up some settings in Unity but I try to make this small program for me now for at least 2 months and I just can't find a solution. I know that it should be possible to read the text at that size because I can read it in Virtual Desktop (but that only support 1 monitor, and I can't modify the world how I would like it.) So if ANYONE has ANY ideas, please tell me. I'm quite desperate because I think it would be really cool but I can't get it to work. I even tried to render my full HD monitors at 4k with DSR952Views0likes0CommentsBuild and Run Fail/Hub Fail
Hi! I have a weird problem. All of the sudden my project won't build and run, and the Oculus Developer Hub won't open. I have tried uninstalling and re-installing several times, but all it will do is open as a white panel and never load. Strangely enough, I can build and run in another Unity project fine, but every time I build and run in my other project, Unity crashes. I reset a few of the previous settings, Unity gives me one error, which is D/************************************************************************************ Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved. Licensed under the Oculus Utilities SDK License Version 1.31 (the "License"); you may not use the Utilities SDK except in compliance with the License, which is provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. You may obtain a copy of the License at https://developer.oculus.com/licenses/utilities-1.31 Unless required by applicable law or agreed to in writing, the Utilities SDK distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ************************************************************************************/ #if UNITY_EDITOR using UnityEditor; [InitializeOnLoadAttribute] public class OculusSampleFrameworkUtil { static OculusSampleFrameworkUtil() { #if UNITY_2017_2_OR_NEWER EditorApplication.playModeStateChanged += HandlePlayModeState; #else EditorApplication.playmodeStateChanged += () => { if (EditorApplication.isPlaying) { OVRPlugin.SendEvent("load", OVRPlugin.wrapperVersion.ToString(), "sample_framework"); } }; #endif } #if UNITY_2017_2_OR_NEWER private static void HandlePlayModeState(PlayModeStateChange state) { if (state == PlayModeStateChange.EnteredPlayMode) { OVRPlugin.SendEvent("load", OVRPlugin.wrapperVersion.ToString(), "sample_framework"); } } #endif } #endif Any help would be greatly appreciated! Specifically the error in the console: NullReferenceException: Object reference not set to an instance of an object OculusSampleFrameworkUtil.HandlePlayModeState (UnityEditor.PlayModeStateChange state) (at Assets/Oculus/SampleFramework/Editor/OculusSampleFrameworkUtil.cs:43) UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:441)1.6KViews0likes1CommentUnity Shutting down shortly after exiting play mode on Quest 2
As stated above, My version of Unity (2020.3.16f1) is shutting down with no error messages or logs Within a minute of removing my HMD and it going into 'sleep'. I think I am just missing something in the settings because I have another project (with identical settings that I can see) that does not cause the same problem. Below are screencaps of the settings and packages I have installed. The base project is the URP template from the Unity Hub new project. Any other screenshots can be included on request.789Views0likes0CommentsOVROverlay don't work with Oculus Quest
Hi guys, Like the title mention, I can't find no way to make OVROverlay to work in any scene on the quest. Everything is working perfectly in editor through link. I'm using Unity v2019.3.9f1, Oculus Utilities v1.52.0, OVRPlugin v1.52.0, SDK v1.52.0, Oculus XR Plugin 1.4.3 and Unity Integration 20.0. At first I tried building OVROverlay sample scene (with and without "Protected Context" from XR settings) without success. While this is working in editor and don't show any error in build, I'm currently out of solutions. Can you think of anything else ? **documentation/unity/unity-ovroverlay/** This could come from this option that is no longer available : "For Oculus Quest: To enable support on Oculus Quest you must also render the OVROverlay layer as an External Surface and select Protected Content in Player Settings > Virtual Reality > Oculus." OVROverlay layer as an External Surface ? What is this ?3.5KViews0likes5Comments