Search Issue Tracker

Active

Under Consideration for 6000.5.X

Votes

0

Found in

6000.3.4f1

6000.4.0b4

6000.5.0a4

Issue ID

UUM-132058

Regression

No

Selecting multiple GameObjects with Visual Effect in Hierarchy throws “MissingComponentException” in the Console window

Hierarchy V2

-

Steps to reproduce:
1. Create new Unity project using High Definition 3D Template
2. In Project window create a new Scene (Create > Scene > Scene)
3. Open New Scene
4. In Project window create Visual Effect Graph Asset
5. Drag VFX Asset to the Hierarchy
6. In Hierarchy holding Shift, select Main Camera + Directional Light + New VFX GameObjects
7. Observe the Console window

Actual results: Error are thrown in the Console window
Expected results: No errors are thrown in the Console window

Reproducible with versions: 6000.3.4f1, 6000.4.0b4, 6000.5.0a4
Can’t test with versions: 6000.0.65f1 (Hierarchy V2 not available)

Tested on (OS): macOS Tahoe 26.2 (M1)

Error:
{code:java}
MissingComponentException: There is no 'VisualEffect' attached to the "Main Camera" game object, but a script is trying to access it.
You probably need to add a VisualEffect to the game object "Main Camera". 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:1086)
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 <228ce715ea63477d858c72f4571f5e9e>:0)
UnityEditor.VFX.UI.VFXViewWindow.AttachTo (UnityEngine.VFX.VisualEffect visualEffect) (at ./Library/PackageCache/com.unity.visualeffectgraph@f3a57f46bdfe/Editor/GraphView/VFXViewWindow.cs:188)
UnityEditor.VFX.AdvancedVisualEffectEditor.AutoAttachToSelection () (at ./Library/PackageCache/com.unity.visualeffectgraph@f3a57f46bdfe/Editor/Inspector/AdvancedVisualEffectEditor.cs:746)
UnityEditor.VFX.AdvancedVisualEffectEditor.OnEnable () (at ./Library/PackageCache/com.unity.visualeffectgraph@f3a57f46bdfe/Editor/Inspector/AdvancedVisualEffectEditor.cs:113)
{code}

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.