- Home /
Why am i getting a NullReferenceException when i switch platform to Android?
The steps i did:
Assets>Import package>Environment
Assets>Import package>custom package>GoogleVRForUnity_1.120.0.unitypackage
GameObject> 3D object> Terrain
Save Scene
Build Settings> add open scene
Build Settings> Switch platform - Android
Error details:
NullReferenceException UnityStandardAssets.CrossPlatformInput.MobileControlRig.EnableControlRig (Boolean enabled) (at Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs:89) UnityStandardAssets.CrossPlatformInput.MobileControlRig.CheckEnableControlRig () (at Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs:80) UnityStandardAssets.CrossPlatformInput.MobileControlRig.OnActiveBuildTargetChanged (BuildTarget previousTarget, BuildTarget newTarget) (at Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs:98) UnityEditor.Build.BuildPipelineInterfaces.OnActiveBuildTargetChanged (BuildTarget previousPlatform, BuildTarget newPlatform) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:345) UnityEditor.Build.BuildPipelineInterfaces:OnActiveBuildTargetChanged(BuildTarget, BuildTarget)
Please do help. I've been stuck on it.
Unity 2017.3.0f3
Your answer
![](https://koobas.hobune.stream/wayback/20220612151603im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Probuilder throws ArgumentReferenceException when Extruding object on Android 0 Answers
Is there a Unity 5 Bug affecting tags with Android builds? 2 Answers
Android 6.0 Marshmallow creates black bar along bottom of screen. 4 Answers
Why are my OnTriggerEnter2D events firing only on android in a situation they shouldnt be firing? 0 Answers
Unity 2019.2 lwrp brightness problem 0 Answers