Search Issue Tracker

Fixed in 13.1.1

Votes

0

Found in [Package]

10.6

Issue ID

1362739

Regression

No

[VFXGraph] Connection from GPUEvent to Spawn should be avoided

Package: Visual Effect Graph

-

Steps to reproduce (see attached gif) :
- In a system with a trigger even on die
- Connect even output to GPUEvent input
- Draw a connection from SpawnEvent
- Select "Spawn"

Result : After compilation of the graph, the following error is logged :
VFXChains : Exception while compiling expression graph: System.InvalidCastException: Specified cast is not valid.
at UnityEditor.VFX.VFXBasicUpdate+<>c.<get_attributes>b__20_0 (UnityEditor.VFX.VFXData d) [0x00000] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Models\Contexts\Implementations\VFXBasicUpdate.cs:167
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at UnityEditor.VFX.VFXBasicUpdate+<get_attributes>d__20.MoveNext () [0x000bd] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Models\Contexts\Implementations\VFXBasicUpdate.cs:167
at System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x0003d] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Collections.Generic.SparseArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x00000] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Collections.Generic.SparseArrayBuilder`1[T].ReserveOrAdd (System.Collections.Generic.IEnumerable`1[T] items) [0x00017] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Linq.Enumerable+ConcatNIterator`1[TSource].LazyToArray () [0x00021] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Linq.Enumerable+ConcatNIterator`1[TSource].ToArray () [0x00008] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at UnityEditor.VFX.VFXData.CollectAttributes () [0x00347] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Data\VFXData.cs:321
at UnityEditor.VFX.VFXGraphCompiledData.Compile (UnityEditor.VFX.VFXCompilationMode compilationMode, System.Boolean forceShaderValidation) [0x00219] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Compiler\VFXGraphCompiledData.cs:1055 : at UnityEditor.VFX.VFXBasicUpdate+<>c.<get_attributes>b__20_0 (UnityEditor.VFX.VFXData d) [0x00000] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Models\Contexts\Implementations\VFXBasicUpdate.cs:167
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at UnityEditor.VFX.VFXBasicUpdate+<get_attributes>d__20.MoveNext () [0x000bd] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Models\Contexts\Implementations\VFXBasicUpdate.cs:167
at System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x0003d] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Collections.Generic.SparseArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x00000] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Collections.Generic.SparseArrayBuilder`1[T].ReserveOrAdd (System.Collections.Generic.IEnumerable`1[T] items) [0x00017] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Linq.Enumerable+ConcatNIterator`1[TSource].LazyToArray () [0x00021] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Linq.Enumerable+ConcatNIterator`1[TSource].ToArray () [0x00008] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <6db93e44953a44ec9dcacc4ba86c2139>:0
at UnityEditor.VFX.VFXData.CollectAttributes () [0x00347] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Data\VFXData.cs:321
at UnityEditor.VFX.VFXGraphCompiledData.Compile (UnityEditor.VFX.VFXCompilationMode compilationMode, System.Boolean forceShaderValidation) [0x00219] in U:\Repos\gfx-master\com.unity.visualeffectgraph\Editor\Compiler\VFXGraphCompiledData.cs:1055
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Expected : According to https://unity.slack.com/archives/C1R2CL5S6/p1630659416012000 , this connection is illegal, and maybe the spawn block should be proposed as an option ?

Reproduces with :
- Unity 2020.3.15f2 / Graphics 10.6
- Unity 2022.1.0a7 / Graphics master

  1. Response avatar

    Resolution Note (fix version 13.1.1):

    Fixed in 13.1.1 (2022.1.0a16)

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.