ViveInputUtility-Unity
ViveInputUtility-Unity copied to clipboard
can't play in editor while WaveVR support turned on (1.10.4.0)
If you develop the game in editor on Rift/Vive and have Focus Wave support turned on in VIUSettings asset, it won't play. This worked on 1.10.3. If you turn off the WaveVR support, now it plays in editor but builds won't work.
The workaround was turning it off in editor in code, WaveVRSettings.cs:
public static bool activateWaveVRModule {
get
{
// Kova: if this is turned on playing in unity editor won't work, if it's turned on builds won't work
if (Application.isEditor && Application.isPlaying) return false;
return Instance == null ? ACTIVATE_WAVE_VR_MODULE_DEFAULT_VALUE : s_instance.m_activateWaveVRModule;
}
set
{
if (Instance != null) { Instance.m_activateWaveVRModule = value; }
}
}
@frg-kova
If you develop the game in editor on Rift/Vive and have Focus Wave support turned on in VIUSettings asset, it won't play. This worked on 1.10.3.
Q: I checked on my side, WaveVR code will not run, I am not sure why it won't play. If you have error log for reference, that will be helpful.
If you turn off the WaveVR support, now it plays in editor but builds won't work.
Q: Are you trying to build on PC or Android platform?
And, could you list how many SDK plugins you have in your project? What are they and also their versions? I would like to duplicate this issue myself, thanks!
We're on android platform, Unity 2018.4.6f1 / WaveVR 3.0.2 / VIU 1.10.4 / SteamVR v2.3.2 (sdk 1.4.18) I don't remember any related error or warning logs, but wasn't actively looking through them all also.
@frg-kova You try to play on Android platform. Should I say you are actually referring to WaveVR Simulator does not play? Could you provide a video or a sample project for me to debug?
no, we don't use simulator, simulator is only if you don't have VR device connected to your PC
So in earlier versions of SDKS and VIU (1.10.3), you were on android platform, but if you hit play in editor the game would run on HMD (Rift or Vive) if you have it connected.
Soon after I fixed it with provided workaround I went on another project so I'll get you video or sample project when I get back to it.
So in earlier versions of SDKS and VIU (1.10.3), you were on android platform, but if you hit play in editor the game would run on HMD (Rift or Vive) if you have it connected.
OK, I never know this will happen, let me try on 1.10.3 and see what I can do, thanks!
@frg-kova I think I found the root cause, it should be the WaveVR SDK. They modify the behavior to the Wave Simulator. When you are using VIU v1.10.3, you should be using WaveVR 2.18 instead of 3.0.2. Although I couldn't see anything in Rift while playing my scene, I saw Unity Editor is using HMD's tracking.
we were on VIU 1.10.3 / WaveVR 2.1.8 then upgraded to VIU 1.10.4 / WaveVR 3.0.2
The point is, if you have Vive or Rift connected to your PC, and you're on android platform, when you hit play in editor it's really nice to develop on HMD. With VIU 1.10.4 you can do that if you disable WaveVR support in VIUSettings. You have to enable it later when you're done so you don't mess up the build. This is the problem I was solving.
Sounds like you're on track to something, good luck.
You mentioned you can still develop on HMD when on Android platform, but are you able to see any controllers for VIU v1.10.3?
Could you list what other differences between v1.10.3 and v1.10.4? If in v1.10.3 you don't have to uncheck WaveVR support, then v1.10.4 you need to uncheck, that is because WaveVR SDK, not due to anything in VIU. You can still do the same trick with v1.10.4 and WaveVR 2.1.8.
BTW, there is new feature in WaveVR SDK 3.1 that you can view in Focus while playing.
on VIU 1.10.3 / WaveVR 2.1.8 I was able to play in editor like I was playing for pc - able to see Vive or Rift controllers as well - SteamVR takes over. That reminds me we upgraded also to SteamVR 2.3.2, forgot what it was before, 2.something.
If in v1.10.3 you don't have to uncheck WaveVR support, then v1.10.4 you need to uncheck, that is because WaveVR SDK, not due to anything in VIU
Does it really matter who's change it was? VIU is the wrapper around SDKs and responsible for managing them. Wouldn't be nice if you could play on your connected HMD in editor out of the box? I already have a fix for it so it doesn't bother me anymore, but wouldn't you want to support that officially?
oooh that would be nice if we could view the game / play on Focus if connected on WaveVR 3.1. I'm also happy about performance increase that were announced to go with it.
I would like to clarify that WaveVR SDK is imported in your project, so for consistency if both v1.10.3 and v1.10.4 checked Vive Focus in VIU Settings, v1.10.3 can play on your connected HMD in editor but v1.10.4 cannot, this is not VIU's responsibility, because developer already checked in VIU Settings.
And, if keep the same version of WaveVR SDK 2.1.8, if in v1.10.3 can work and v1.10.4 cannot work, then this should be an issue on VIU.
Since you already found a workaround by unchecking Vive Focus which will still allow you to use Rift/Vive HMD while playing on editor, then this will not consider an issue in VIU to fix.
yeah this is not an issue for me, just wanted to share the solution I found if somebody else wants the same thing.