官方文档
具体的修改设置,在官方文件中都有,直接上链接,我就不再多余赘述。
相关的官方文档:https://hub.vive.com/storage/docs/zh-cn/ConfigureAppCapabilities.html
文档
文档修改后的内容如下:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.CNTEN.WaveSample"
xmlns:tools="http://schemas.android.com/tools">
<application android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@style/Theme.WaveVR.Loading"
android:resizeableActivity="false"
tools:replace="android:theme">
<uses-sdk android:minSdkVersion="25"/>
<!--You can use your theme here.-->
<activity android:name="com.htc.vr.unity.WVRUnityVRActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
android:configChanges="density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:enableVrMode="@string/wvr_vr_mode_component">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="com.htc.intent.category.VRAPP" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
<meta-data android:name="minWaveSDKVersion" android:value="1" />
<!--Please consider the DoF support of HMD and controller individually for your content.-->
<!--Set value “3DoF” if your content only considers the rotation pose. -->
<!--Set value “6DoF” if your content considers both rotation and position pose. -->
<!--Set value “3,6DoF” if your content is capable of supporting both 3 and 6 DoF playing. -->
<meta-data android:name="com.htc.vr.content.NumDoFHmd" android:value="6DoF"/>
<meta-data android:name="com.htc.vr.content.NumDoFController" android:value="6DoF"/>
<!--Fill the value of how many controllers the application can support.-->
<!--The value could be 0, 1 or 2. Use comma(,) between value if your content can support multiple cases.-->
<!--Set value “0” if your content supports gaze mode only. -->
<!--Set value “1” if your content only supports playing with one controller. -->
<!--Set value “1,2” if your content supports playing with either one controller or two controllers. -->
<!--Set value “0,1,2” if your content supports all cases, which mean user can play by gaze mode, one controller or two controllers. -->
<meta-data android:name="com.htc.vr.content.NumController" android:value="2"/>
</activity>
</application>
<!-- <uses-permission android:name="android.permission.CAMERA" /> -->
<!-- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> -->
<uses-permission android:name="vive.wave.vr.oem.data.OEMDataRead" />
<uses-permission android:name="vive.wave.vr.oem.data.OEMDataWrite" />
</manifest>
其中package="com.CNTEN.WaveSample"
是要根据项目中的PlayerSettings->Other Settings->Identification->Package Name设置相同。
文档位置
首先,一看到AndroidManifest.xml文件我们都会到图片中的1号位置(Plugins文件夹下的Android文件夹中)去寻找。但如果你是刚导入的Wave VR SDK就会发现Plugins文件夹下根本就没有Android文件夹;如果你Build报错过后,才会看见这个位置出现了AndroidManifest.xml文件,这时你根据文档去修改这个路径下的文件是不会有用的。
我们应该去修改图片中2号位置的文件,该文件进行修改后,打包时1号位置的文件也会进行同步修改,这也就是只写修改1号位置文件无效的原因。
额外设置
除此之外,还需要一项设置,在另一篇文章中:Unity安卓(WaveVR)打包失败:CommandInvokationFailure: Gradle build failed.