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
- Crash on mecanim::SetValueWeight when switching the AnimationMixerPlayable connection with Animator's UpdateMode set to "Animate Physics"
- The "StringComparer.InvariantCultureIgnoreCase.GetHashCode()" returns different Hash Codes for the same word with the only difference being case sensitivity in WebGL
- 2D Light Textures show the lights of any 'blend style' index higher than theirs (if present) when they aren't visible by the Camera using Render Graph
- [SpeedTree] Wireframe mode not rendering correctly ST assets
- Light2D affecting only the Default Sorting Layer will also affect any Custom Lit Sprite not on that Layer when using Render Graph
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.