Search Issue Tracker

Not Reproducible

Votes

1

Found in

5.5.0b6

Issue ID

839122

Regression

No

Error in console on applying changes to prefab in Playmode

Themes

-

To repro:

1. Open project attached
or
Create a new one, create a prefab from e.g. Cube and add several Cubes from this prefab to scene.
2. Select Cube.
3. Enter the Playmode.
4. Change Scale (e.g. x = 2).
5. Press Apply in Inspector (error in Console appears).
6. Exit Playmode.

Actual result: Scale and other non-Transform options changes are appliable only after exiting the Playmode.
Error in console:
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:147)
UnityEditor.GameObjectInspector.DoPrefabButtons (PrefabType prefabType, UnityEngine.GameObject go) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:355)
UnityEditor.GameObjectInspector.DrawInspector () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:234)
UnityEditor.GameObjectInspector.OnHeaderGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:143)
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:1114)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1028)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:353)
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)

Expected result: Changes are applied to prefab and its instances with no error.

Versions info:
There is no ability to apply changes to prefab in 5.3.6p5 (28930307ad49).
Reproducible in 5.4.1p3 (1b587b7935dc) and 5.5.0b7 (bd91e53964bc)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.