Search Issue Tracker
By Design
Votes
1
Found in
2017.2.0b3
Issue ID
930177
Regression
No
NullReferenceException in MobileControlRig.EnableControlRig after switching platform in Editor
Steps to repro:
1. Open attached project;
2. Go to BuildSettings (File -> Build Settings);
3. Select any other available platform (i.e. WebGL);
4. Click Switch Platform.
Expected result:
Platform is switched without errors.
Actual result:
Error:
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:82)
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)
is thrown in the console. See attached video.
Notes:
- Reproducible in 2017.2.0b3, 2017.1.0f3;
- The code doesn't compile in 5.6.1p2;
- Reproducible on Windows 10;
- Uncommenting line 82 in 'MobileControlRig.cs' script fixes the issue.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Silicon] Crash on mono_get_hazardous_pointer when disconnecting Bluetooth Headhpones while in Play Mode
- Switching Project when importing complete project does not import all assets and project opens incomplete
- [Linux] Input.mouseScrollDelta is inconsistent when limiting framerate
- Undoing the branch rotation resets only wireframe and not mesh when undoing the action first time after launching the project
- Asset Bundles retain their previous hash when dependency of prefab instance changes
pRob3
Oct 13, 2017 12:01
Also got this bugg when trying to build for OSX on my PC.
alexwood87
Aug 12, 2017 02:52
This also happens in 2017.2.0b6 when switching to IOS or Android from any platform.