Network Checklist for Unity VR Apps
Checklist for Internet Connection in Unity VR App Builds
While working on a Unity VR app for the Meta Quest, I encountered a peculiar issue. The app functioned seamlessly in debug mode on my development machine. However, when I built and installed it on the Meta Quest, the log highlighted an internet-related problem, stating, “cannot resolve the host name.” I’ve observed numerous threads on Unity communities discussing this very issue. In this article, I’ll share a checklist that has helped me address network connectivity challenges.
Check List:
- Ensure the VR device has an active Internet connection.
- Review the
AndroidManifest.xml
for the necessary network permissions. - Explore the Meta support options.
Setps:
- Enable the manual Main Manifest in the settings:
Navigate to: File > Build Settings > Player Settings
- In the Player Settings, follow these steps:
Go to: Player > Other Settings > Configuration
Change the Internet Access to “Required.”
If necessary, enable the “Allow Http” options.
Most of the time, the app should function correctly after these adjustments. If not, enable the manual Main Manifest and inspect the file for network permissions. This option can be found at: Player > Publishing Settings > Build
Look for these lines inside the <manifest>
tag but outside the <application>
tag:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Here’s an example of what your AndroidManifest.xml
might look like:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<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>
</application>
</manifest>
If the app still doesn’t connect, double-check the settings mentioned above.
Thank you for reading! I hope this guide proves helpful.