googlevr / cardboard

Open source Cardboard SDK and samples
Other
1.48k stars 249 forks source link

how to add an extra icon in vr mode ui? #353

Open comsyspro opened 2 years ago

comsyspro commented 2 years ago

When using the VR mode there are 2 buttons. on top left there is the "close" button and on top right the "gear" button. Now I want to add an extra button on bottom right to switch from VR to 2D and reverse. How can you do this? Or could you also create a UI canvas in Unity with extra buttons - but here I think in VR mode the Unity UI will be disappearing and hidden behind the VR cardboard. Any solutions or tips?

arilow commented 2 years ago

Thanks for reaching out to us @comsyspro!

In the Cardboard XR Plugin, the buttons are added as widgets. You can follow the life cycle of _gearTexture in order to add your own.

Let us know if you need further help.

Thanks!

comsyspro commented 2 years ago

Thanks, that is a starting point and I think I can make it.