Skip to content

NullReferenceException when trying to Explore Scenes #2

Open
@ClementCapart

Description

@ClementCapart
NullReferenceException: Object reference not set to an instance of an object
AssetDependencyGraph.CreateNode (UnityEngine.Object obj, System.String assetPath, System.Boolean isMainNode, System.Boolean hasDependencies) (at Assets/Shared/Utils/Editor/AssetDependencyGraph.cs:185)
AssetDependencyGraph.CreateDependencyNodes (System.String[] dependencies, UnityEditor.Experimental.UIElements.GraphView.Node parentNode, UnityEditor.Experimental.UIElements.GraphView.Group groupNode, System.Int32 depth) (at Assets/Shared/Utils/Editor/AssetDependencyGraph.cs:145)
AssetDependencyGraph.CreateDependencyNodes (System.String[] dependencies, UnityEditor.Experimental.UIElements.GraphView.Node parentNode, UnityEditor.Experimental.UIElements.GraphView.Group groupNode, System.Int32 depth) (at Assets/Shared/Utils/Editor/AssetDependencyGraph.cs:151)
AssetDependencyGraph.ExplodeAsset () (at Assets/Shared/Utils/Editor/AssetDependencyGraph.cs:127)
UnityEngine.Experimental.UIElements.Clickable.OnMouseUp (UnityEngine.Experimental.UIElements.MouseUpEvent evt) (at C:/buildslave/unity/build/Modules/UIElements/Clickable.cs:152)
UnityEngine.Experimental.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/Events/EventCallback.cs:62)
[...]

Testing in 2018.4
I removed the rest of the callstack as I believe it's irrelevant but let me know if you need it.

I did a little bit of investigation and it is due to userData never being set on the mainNode (scenes, in my test cases)
I imagine that also means there is something depending on the mainNode which doesn't make much sense since it would mean there is circular dependency.

Let me know if you need additional testing, I would look into fixing it myself if I had time but I can't at the moment. If I end up doing it, I'll open a pull request.

Thanks again for sharing that tool!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions