Search Issue Tracker

Fixed in 2021.2.X

Votes

0

Found in

Issue ID

1325888

Regression

No

Taking snapshot of a SceneTemplate in a readonly package throws an exception

Scene Template

-

1- Create a new project using the HDRP template
2- In project browser go to Packages/High Definition RP/Editor/SceneTemplates/Indoors
3- Click the IndoorsSceneTemplate asset
4- In the Inspector click the Take Snapshot button

Tested with 21.1 and 21.2. On mac and windows.

Expected results: since the package is readonly, a warning that the scenetemplate asset was saved.
The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered:
Packages/com.unity.render-pipelines.high-definition/Editor/SceneTemplates/Indoors/IndoorsSceneTemplate.scenetemplate
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Actual Results: exception is thrown
FileNotFoundException: Could not find editor resource Icons/SceneTemplate.png
UnityEditor.Experimental.EditorResources.Load[T] (System.String assetPath, System.Boolean isRequired) (at D:/work/unity-2021.x/Editor/Mono/EditorResources.cs:449)
UnityEditorInternal.InternalEditorUtility.FindIconForFile (System.String fileName) (at D:/work/unity-2021.x/Editor/Mono/InternalEditorUtility.cs:46)
UnityEditor.FilteredHierarchy+FilterResult.get_icon () (at D:/work/unity-2021.x/Editor/Mono/ProjectWindow/CachedFilteredHierachy.cs:48)
UnityEditor.ObjectListArea+LocalGroup.DrawItem (UnityEngine.Rect position, UnityEditor.FilteredHierarchy+FilterResult filterItem, UnityEditor.BuiltinResource builtinResource, System.Boolean isFolderBrowsing) (at D:/work/unity-2021.x/Editor/Mono/ObjectListLocalGroup.cs:792)
UnityEditor.ObjectListArea+LocalGroup.DrawInternal (System.Int32 beginIndex, System.Int32 endIndex, System.Single yOffset) (at D:/work/unity-2021.x/Editor/Mono/ObjectListLocalGroup.cs:240)
UnityEditor.ObjectListArea+Group.Draw (System.Single yOffset, UnityEngine.Vector2 scrollPos, System.Int32& rowsInUse) (at D:/work/unity-2021.x/Editor/Mono/ObjectListGroup.cs:152)
UnityEditor.ObjectListArea.HandleListArea () (at D:/work/unity-2021.x/Editor/Mono/ObjectListArea.cs:1095)
UnityEditor.ObjectListArea.OnGUI (UnityEngine.Rect position, System.Int32 keyboardControlID) (at D:/work/unity-2021.x/Editor/Mono/ObjectListArea.cs:402)
UnityEditor.ProjectBrowser.OnGUI () (at D:/work/unity-2021.x/Editor/Mono/ProjectBrowser.cs:1934)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at D:/work/unity-2021.x/Editor/Mono/HostView.cs:418)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at D:/work/unity-2021.x/Editor/Mono/GUI/DockArea.cs:381)
UnityEditor.DockArea.OldOnGUI () (at D:/work/unity-2021.x/Editor/Mono/GUI/DockArea.cs:371)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/IMGUIContainer.cs:366)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/IMGUIContainer.cs:676)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/IMGUIContainer.cs:543)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/Renderer/UIRenderer/UIRenderers.cs:132)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/Renderer/UIRRenderChain.cs:483)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/Renderer/UIRRepaintUpdater.cs:76)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/VisualTreeUpdater.cs:155)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/Panel.cs:942)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/Panel.cs:985)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/UIElementsUtility.cs:446)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/UIElementsUtility.cs:209)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at D:/work/unity-2021.x/External/MirroredPackageSources/com.unity.ui/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at D:/work/unity-2021.x/Modules/IMGUI/GUIUtility.cs:189)

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.