Unity Issue Tracker - Multi selecting VFX Graph with other scene objects throws MissingComponent exception
Closed
UUM-62520
Multi selecting VFX Graph with other scene objects throws MissingComponent exception
Unity: Visual Effects
VFX
Won't Fix
2023.3.X
Cannot Reproduce
6.0.X
We are unable to reproduce this issue consistently and have not found a reliable way to replicate it.
Versions tested: 2023.3.0b5
Steps to repro:
1) Create an empty HDRP project
2) Create any VFX graph and drop it into the default scene
3) Marquee select it along with any other scene object (sun light in my case)
4) Observe when multi selected, editor throws an exception about missing component
Stack trace:
MissingComponentException: There is no 'VisualEffect' attached to the "Sun" game object, but a script is trying to access it.
You probably need to add a VisualEffect to the game object "Sun". Or your script needs to check if the component is attached before using it.
UnityEngine.Object+MarshalledUnityObject.TryThrowEditorNullExceptionObject (UnityEngine.Object unityObj, System.String parameterName) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:828)
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/BindingsHelpers.cs:61)
UnityEngine.VFX.VisualEffect.get_visualEffectAsset () (at <91fec0fc12c945fba1f734bac7012647>:0)
UnityEditor.VFX.UI.VFXViewWindow.AttachTo (UnityEngine.VFX.VisualEffect visualEffect) (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/GraphView/VFXViewWindow.cs:210)
UnityEditor.VFX.AdvancedVisualEffectEditor.AutoAttachToSelection () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Inspector/AdvancedVisualEffectEditor.cs:744)
UnityEditor.VFX.AdvancedVisualEffectEditor.OnHierarchySelectionChanged () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Inspector/AdvancedVisualEffectEditor.cs:160)
UnityEditor.Selection.Internal_CallSelectionChanged () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Selection/Selection.cs:38)
Prioritise and Follow this issue
Have a workaround or additional info about this issue?