Search Issue Tracker
Fixed in 5.6.0
Votes
0
Found in
5.6.0b5
Issue ID
873954
Regression
Yes
Changing Layer for a hierarchy triggers an InvalidOperationException
Changing Layer for a hierarchy triggers an InvalidOperationException
Repro:
1- Open attached project.
2- Open scene 'Untitled'.
3- Select 'Cube' game object.
4- In the inspector, change Layer to a different value.
5- In the 'Change Layer' dialog, click on 'Yes, change children'
6- InvalidOperationException should show in the console.
Callstack:
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Generic.Stack`1[UnityEditor.PropertyGUIData].Pop ()
UnityEditor.EditorGUI.EndProperty () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:4885)
UnityEditor.GameObjectInspector.DoLayerField (UnityEngine.GameObject go) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:439)
UnityEditor.GameObjectInspector.DrawInspector () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:215)
UnityEditor.GameObjectInspector.OnHeaderGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:138)
UnityEditor.Editor.DrawHeader () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:355)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1110)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1024)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:359)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
UnityEditor.PopupCallbackInfo:SetEnumValueDelegate(Object, String[], Int32)
Reproducible: 5.6.0b5, 5.6.0b3
Not reproducible: 5.5.0f3
Comments (1)
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
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
nyonge
Aug 31, 2017 13:30
Still occurs in Unity 5.6.1f1, on Mac OS X (macOS Sierra 10.12.6)
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Generic.Stack`1[UnityEditor.PropertyGUIData].Pop ()
UnityEditor.EditorGUI.EndProperty () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:4879)
UnityEditor.GameObjectInspector.DoLayerField (UnityEngine.GameObject go) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:482)
UnityEditor.GameObjectInspector.DrawInspector () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:213)
UnityEditor.GameObjectInspector.OnHeaderGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:136)
UnityEditor.Editor.DrawHeader () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:352)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1105)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1019)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:358)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.c