Unable to access and utilize the microphone on the Quest to affect game objects in Unity
Hello,
I am trying to access the Quest (or GO) microphone to affect game objects or trigger events in Unity. I am able to use the microphone to make an object move on it's Y axis based on the loudness value of the microphone input when playing the unity editor. But, once I build my project and load it on the Quest or GO, it does not respond. It does show the mic as the selected device and it shows the Microhpone.isRecording to be true, but there is no change in the loudness value. View this recording to see what I'm talking about: https://drive.google.com/file/d/1XcV6vAeV5ITTlq1TAO_QSHCGJWyo0-di/view?usp=sharing
I do have "Can Own Microphone" enabled on the LocalAvatar as well.
Attached is the script I'm using to control the game object and microphone. And here is the android manifest I am using:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.roundtable.macys" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="@StyLe/UnityThemeSelector" android:icon="@Mipmap/app_icon" android:label="@String/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@String/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unity.build-id" android:value="54caf677-6455-44f1-9ddc-a5a0c33548ad" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="False" />
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MICROPHONE" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
</manifest>
Any help is greatly appreciated!
I am trying to access the Quest (or GO) microphone to affect game objects or trigger events in Unity. I am able to use the microphone to make an object move on it's Y axis based on the loudness value of the microphone input when playing the unity editor. But, once I build my project and load it on the Quest or GO, it does not respond. It does show the mic as the selected device and it shows the Microhpone.isRecording to be true, but there is no change in the loudness value. View this recording to see what I'm talking about: https://drive.google.com/file/d/1XcV6vAeV5ITTlq1TAO_QSHCGJWyo0-di/view?usp=sharing
I do have "Can Own Microphone" enabled on the LocalAvatar as well.
Attached is the script I'm using to control the game object and microphone. And here is the android manifest I am using:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.roundtable.macys" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="@StyLe/UnityThemeSelector" android:icon="@Mipmap/app_icon" android:label="@String/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@String/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unity.build-id" android:value="54caf677-6455-44f1-9ddc-a5a0c33548ad" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="False" />
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MICROPHONE" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
</manifest>
Any help is greatly appreciated!
