I’m trying to develop on Google Glass, and I followed in advice on this StackOverflow question to set up the project: android - Unity3D + Glass Development Kit Preview - Stack Overflow
Before I try to modify the AndroidManifest.xml, I can successfully click Build and Run and the app starts on the Glass. I needed to modify the manifest to add the necessary voice command intents:
<activity android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape" android:name="com.equipcodes.unity1.UnityPlayerProxyActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data android:name="com.google.android.glass.VoiceTrigger" android:resource="@xml/my_voice_trigger" />
</activity>
I made modifications to the AndroidManifest generated in the export from the build, and then copied the file back into Assets/Plugins/Android/
I can then export to eclipse and run fine, but when I try to just “Build and Run” from the build menu, I get the following error:
Unable to find unity activity in manifest. You need to make sure orientation attribut is set to landscape manually. UnityEditor.HostView:OnGUI()
There’s something about clicking build and run that’s different from exporting and then running from eclipse.