Search Issue Tracker
Won't Fix
Votes
2
Found in [Package]
4.10.0
Issue ID
1141611
Regression
No
Editor is throwing exception errors when double clicking folder in Project view
How to reproduce:
1. Open attached project
2. Double click any folder under Assets
----------------------------
Observe the console
Reproduced with: 2018.3.9f1
Does not reproduce with: 2019.1 and 2019.2
Error:
Exception thrown while invoking [OnOpenAssetAttribute] method 'UnityEditor.ShaderGraph.ShaderGraphImporterEditor:OnOpenAsset (int,int)' : ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x00031] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
at System.String.Substring (System.Int32 startIndex) [0x00008] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
at UnityEditor.ShaderGraph.ShaderGraphImporterEditor.ShowGraphEditWindow (System.String path) [0x0001f] in C:\Users\justasz\Downloads\case_1140070-TestProject_01\Library\PackageCache\com.unity.shadergraph@4.10.0-preview\Editor\Importers\ShaderGraphImporterEditor.cs:32
at UnityEditor.ShaderGraph.ShaderGraphImporterEditor.OnOpenAsset (System.Int32 instanceID, System.Int32 line) [0x00008] in C:\Users\justasz\Downloads\case_1140070-TestProject_01\Library\PackageCache\com.unity.shadergraph@4.10.0-preview\Editor\Importers\ShaderGraphImporterEditor.cs:60
UnityEditor.AssetDatabase:OpenAsset()
UnityEditor.AssetDatabase:OpenAsset(Int32) (at C:\buildslave\unity\build\artifacts\generated\bindings_old\common\Editor\AssetDatabaseBindings.gen.cs:316)
UnityEditor.ProjectBrowser:OpenAssetSelection(Int32[]) (at C:\buildslave\unity\build\Editor\Mono\ProjectBrowser.cs:1085)
UnityEditor.ProjectBrowser:AssetTreeItemDoubleClickedCallback(Int32) (at C:\buildslave\unity\build\Editor\Mono\ProjectBrowser.cs:1252)
UnityEditor.IMGUI.Controls.TreeViewController:HandleUnusedMouseEventsForItem(Rect, TreeViewItem, Int32) (at C:\buildslave\unity\build\Editor\Mono\GUI\TreeView\TreeViewController.cs:328)
UnityEditor.IMGUI.Controls.TreeViewController:DoItemGUI(TreeViewItem, Int32, Single, Boolean) (at C:\buildslave\unity\build\Editor\Mono\GUI\TreeView\TreeViewController.cs:508)
UnityEditor.IMGUI.Controls.TreeViewController:IterateVisibleItems(Int32, Int32, Single, Boolean) (at C:\buildslave\unity\build\Editor\Mono\GUI\TreeView\TreeViewController.cs:679)
UnityEditor.IMGUI.Controls.TreeViewController:OnGUI(Rect, Int32) (at C:\buildslave\unity\build\Editor\Mono\GUI\TreeView\TreeViewController.cs:605)
UnityEditor.ProjectBrowser:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\ProjectBrowser.cs:1948)
System.Reflection.MonoMethod:InternalInvoke()
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:342)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:336)
UnityEditor.HostView:InvokeOnGUI(Rect, Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:302)
UnityEditor.DockArea:DrawView(Rect, Rect, Boolean, Boolean, Boolean) (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:361)
UnityEditor.DockArea:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:244)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher:PropagateEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:754)
UnityEngine.Experimental.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:599)
UnityEngine.Experimental.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:68)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:179)
Comments (4)
-
SonicTheHedgiehog
Feb 18, 2021 16:23
For me the scriptable render pipeline asset was already set at graphics settings, a fresh hdrp scene using 2018.4.31f1 . Also i do not use shader graph or something.
I created a new sciptable render pipeline asset and set at graphic settings, named "New HDRenderPipelineAsset" , and closed all tabs except console (because it is last tab), then closed and opened and still double clicking a folder gives that error. -
XRA
Feb 02, 2021 03:41
Also reproduces in 2020.2.2f1 when enabling Hybrid renderer in HDRP with the scripting define ENABLE_HYBRID_RENDERER_V2
-
safetim
May 13, 2020 09:20
I've got the exact same issue with 2018.4.19f1. I can open shader graphs just fine but double-clicking a folder in the project window throws this exception. I've set up the project like Julian described.
-
julian_cruz
Oct 16, 2019 20:59
This issue commonly happens when the project does not have set a Scriptable Render Pipeline asset set in the Graphics settings.
To avoid this issue, you need to create an asset. For instance, Go to Assets > Create > Rendering > Lightweight Render Pipeline Asset; then a scriptable asset is created in your project view.
To install a Scriptable Render Pipeline to avoid the issue.
Go to Edit > Project Settings. In the left menu, click on the Graphics menu item, and attach the asset previously created to Scriptable Render Pipeline settings.Now, you need to close every single instance of the ShaderGraph window previously open.
By doing this you're ready to use our ShaderGraph package. You should be allowed to create ShaderGraph assets or open the files you were trying to open previously.
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
- Foldout arrow indent is misaligned in the Inspector when used in Custom Type
- [Android] The Player screen turns black when playing a video under certain conditions
- Search window icons at the bottom are cut off when Search window is resized vertically
- "Try something else?" text label is cut off when searching for a long text in the Search window
- Rendering Debugger window sections do not have a minimum width set when resizing with the slider in the middle of the window
Resolution Note:
Preview version of Shader Graph does not receive bug fixes. Fixed in Shader Graph 5.x that will ship with 19.1.