Known Issues
Updated: Aug 19, 2024
Crash due to a NullPointerException
in Java Voice SDK library
Some users of Voice SDK v46 have reported seeing a crash originating due to a NullPointerException
in the native Java Voice SDK library. The unity package linked below provides a patch for Voice SDK v46.
Limited access to Microphone/Lip sync issue with Avatar2 and Voice SDK
Only one script can access the microphone at a time when multiple scripts use Unity’s Microphone.Start
method. For example, Voice SDK’s Mic.cs
script uses Microphone.Start
to obtain a microphone stream when the GameObject it is on is enabled. However, other scripts such as LipSyncMicInput.cs
in the Avatar2 package will also attempt to obtain the microphone stream and fail. Other scripts, like LipSyncMicInput.cs
, may disable the microphone stream used by Mic.cs
when used together.
Voice SDK has an abstract class that allows other scripts to record the microphone and share the stream with Voice SDK. The example script LipSyncMicRef.cs
implements the mic sharing script base class, allowing the Avatar2 LipSyncMicInput
script to handle mic input while also providing mic access to Voice SDK. This should fix the issue of the Voice SDK losing mic access on Idle as well as the end-user’s Avatar not showing mic lip sync movements. If your application has any other scripts that may be using the microphone, create your own child of MicBase.cs
in order to fix any issues that may be encountered.
To solve this issue in v42, follow these steps:
- Import the appropriate MicRef Unity package with
MicRef.cs
and LipSyncMicRef.cs
. - Add
LipSyncMicRef
to your AppVoiceExperience (VoiceService) prefab. - Link
LipSyncMicInput
to LipSyncMicRef
if possible. - Match Prefer Oculus Mic setting between
LipSyncMicRef
and LipSyncMicInput
. - Test the results.
NameResolutionFailure
error returned
For Android apps, set internet access as required in your Unity app’s project settings to avoid a NameResolutionFailure
.
In Unity’s Edit > Player project settings window, the Internet Access drop-down list must be set to Require.
Crash due to a NullPointerException
when R8 Minify is used
Shrinking code using R8 for android apps removes references to classes that are referenced using reflection. For this reason, it’s necessary to configure the project so that it keeps certain packages that are accessed this way.
In Unity’s Edit > Player project settings window, the Custom Proguard File must be checked.
In the Project, go to the Assets/Plugins/Android folder and open the proguard-user.txt file. Add the following 2 lines to the file.
-keep class com.oculus.** {*;}
-keep class com.facebook.assistant.** {*;}