Search Issue Tracker

Fixed in 5.4.0

Votes

0

Found in

5.4.0b20

Issue ID

802069

Regression

Yes

[Editor][PlayMode]Regression] Incorrect assert appears when toggling some TerrainSettings in Play mode

Terrain

-

Steps to reproduce:

1. Open Unity;
2. Open attached project and 'test' scene;
3. Select Terrain component in the Hierarchy;
4. Go to TerrainSettings tab in Terrain Component's Inspector settings;
5. Enter Play Mode;
6. Toggle some 'Base Terrain' and 'Tree and Detail' objects settings - change values or just drag sliders;
7. Observe the console.

Actual result:

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:156)
UnityEditor.TerrainInspector.ShowSettings () (at /Users/builduser/buildslave/unity/build/Editor/Mono/TerrainEditor/TerrainInspector.cs:1118)
UnityEditor.TerrainInspector.OnInspectorGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/TerrainEditor/TerrainInspector.cs:1475)
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:1235)
UnityEditor.DockArea:OnGUI()

appears in the console. See attached video and actual.png screenshot.

Regression introduced in Unity 5.4.

Expected result:
This assert should not be displayed, since it's unrelated to Terrain component and toggled settings are still applied to Terrain component.

Notes:
- Reproducible on both OSX 10.11.4 and Windows 10;
- Reproducible in 5.4.0b20, 5.5.0a1;
- Not reproducible in 5.3.5p1;
- Not reproducible for toggling 'Wind Settings for Grass', 'Resolution' or 'Heightmap' sections of Terrain component;
- Not reproducible for toggling those settings, while not being in Play mode.

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.