ViveInputUtility-Unity icon indicating copy to clipboard operation
ViveInputUtility-Unity copied to clipboard

VIU_WAVEVR is not defined with Wave XR SDK 4.x/5.x

Open mhama opened this issue 2 years ago • 5 comments

Hi, I'm a bit confused when I import Wave XR SDK 4.x/5.x, because it looks like VIU_WAVEVR is not defined automatically. My understanding is that to use WaveVR module, VIU_WAVEVR should be defined.

The condition to define VIU_WAVEVR is this: https://github.com/ViveSoftware/ViveInputUtility-Unity/blob/87340ea2f5c025f69cf69ef1840d428cabaef591/Assets/HTC.UnityPlugin/VRModule/Modules/Editor/WaveVRModuleEditor.cs#L21-L26

But, I can't find WaveVR type, nor WaveVR.cs in Wave XR SDK 4.x/5.x. And it seems like VIU_WAVEVR is not defined actually. Though, it looks like I can still enable WaveVR module in VIUSetting.

Is it expected behaviour?

mhama avatar Jul 13 '23 04:07 mhama

Hi @mhama, VIU_WAVEVR is for previous version which is imported from unitypackage, Current Wave XR SDK 4.x/5.x will use different define. Are you getting any error or issue?

chengnay avatar Jul 27 '23 05:07 chengnay

VIU_WAVEVR is for previous version which is imported from unitypackage, Current Wave XR SDK 4.x/5.x will use different define. Are you getting any error or issue?

Hi, @chengnay , Thank you for the reply!

There's no error/issues. It's (mostly) ok if it's intentional. I just wanted to split our app's code which depends on Wave SDK using VIU_WAVEVR and found this. Though the symbol maybe not designed to be used like this.

But there may be a bit of a problem about readability of the code. I confused a bit when I read the code of WaveVRModule.cs .

  • About property isWaveVRPluginDetected
    • I think that the functionality of this property seems to be a bit different from the name. I thought that this property returns true when Wave SDK is detected, whatever version it is. https://github.com/ViveSoftware/ViveInputUtility-Unity/blob/87340ea2f5c025f69cf69ef1840d428cabaef591/Assets/HTC.UnityPlugin/VRModule/Modules/WaveVRModule.cs#L22-L27
    • If this property is only for older versions of SDK, the name of the property is better to represent it.

Though, it's just my opinion and what's really important is that it works. So please take it with a grain of salt. Thanks,

mhama avatar Jul 27 '23 14:07 mhama

Hi @mhama,

Thanks for your comments. For latest Wave SDK using UnityXR, we change it to WAVEXR. Just curious why you will need to split your code if you are using VIU? I think spliting code should be already done from VIU side. Maybe you are using some feature that VIU did not provide, such as passthrough.

chengnay avatar Jul 28 '23 01:07 chengnay

Hi @chengnay, thanks for your reply,

For latest Wave SDK using UnityXR, we change it to WAVEXR. Just curious why you will need to split your code if you are using VIU? I think spliting code should be already done from VIU side. Maybe you are using some feature that VIU did not provide, such as passthrough.

Yes, we wanted to use video pass-through functionality of WaveVR SDK.

mhama avatar Aug 02 '23 02:08 mhama

Hi @mhama, You can add your custom defined symbols to differentiate between Oculus and Wave. Unity Editor>Project Settings>Player>Other Settings(Script Compilation)

chengnay avatar Aug 02 '23 08:08 chengnay