ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
356 stars 82 forks source link

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

Open mhama opened 1 year ago

mhama commented 1 year ago

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?

chengnay commented 1 year ago

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?

mhama commented 1 year ago

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 .

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,

chengnay commented 1 year ago

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.

mhama commented 1 year ago

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.

chengnay commented 1 year ago

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