0 votes
by (460 points)
edited by

'm using Unity 2019.2.13f1 and SDK (PicoVRUnitySDK64bit-2.8.12B583-20211027) and PUI v4.0.7.

Hi, I am instantiating a canvas along with PvrUICanvas attached script. And I have given Event camera setup at runtime and changed to world space. After instantiation, pvrUIcanvas is getting enabled and disabled for every frame. I can able to click the button under canvas occasionally but not for everytime. What makes this to behave like this. I have no idea.

laterly I found the issue but not solution, I used to play a 360 degree video in a sphere. and I have been instantiating buttons in between the video. Whenever the video is getting played, PVRUIcanvas keep on enabling and disabling. If it is not playing, then it works fine Kindly help me out.

1 Answer

0 votes
by (35.8k points)

Dear developer,
It's not clear what's causing the problem,
Maybe you could try using our Unity XR Platform SDK (Legacy). Try this SDK to see if it works.
Or you can try our video player Demo. can also play 360 degree video.

This video Player demo is based on PicoVR Unity SDK(Deprecated)
https://github.com/picoxr/VideoPlayer

And this Video Player demo is based on Pico Unity XR Platform SDK.
https://github.com/picoxr/VideoPlayer-UnityXR

by (460 points)
edited by

Thanks for your help! Its my mistake, I had put my canvas under update for some reason, and I let it to turn on and off continuously that's the problem.

And I have another problem it might have from my side, I need your suggestion on this error following: what makes this to throw errors like? I have instantiated a canvas pvrUIcanvas attached script, and I m giving reference to event camera at runtime. The canvas contain a button, after the button gets clicked, "UICANVASDRAGGABLEPANEL" is destroyed or disappeared, even the scripts are exist.

NullReferenceException: routine is null
UnityEngine.MonoBehaviour.StopCoroutine (UnityEngine.Coroutine routine) (at C:/buildslave/unity/build/Runtime/Export/Scripting/MonoBehaviour.bindings.cs:117)
PvrUICanvas.RemoveCanvas () (at Assets/PicoMobileSDK/PvrUnitySDK/System/UIEvent/PvrUICanvas.cs:138)
Pvr
UICanvas.OnDisable () (at Assets/PicoMobileSDK/PvrUnitySDK/System/UIEvent/PvrUICanvas.cs:30)

by (35.8k points)

Dear developer,
One possible reason for a NullReferenceException is that this error is reported either when the instance is created using new or when the gameObject attached to the script is destroyed, because MonoBehaviour scripts cannot exist on their own and must be attached to a gameObject.

...