Search Issue Tracker
Fixed
Votes
3
Found in
2022.2.0a17
2023.1.0a1
2023.2.0a1
Issue ID
UUM-3311
Regression
No
[VFX Graph] Disabled block is enabled when changing block's value and saving graph
1. How to reproduce:
# Open the attached VFX (HDRP)
# Make sure that Set Lifetime block is disabled
# Change value from 5 to 1 of the Set Lifetime block
# Save graph
2. How to reproduce:
# Create new project in 2021.3
# Create new VFX
# Open newly created VFX
# Disable 'Set Lifetime Random VFX' block
# Make sure to save changes and exit the project
# Open this project with latest 2022.2
# Notice that VFX asset has no shader dependencies generated
# Open VFX asset and notice that Set Lifetime Random block is disabled but block's background is not faded out
Expected result: block remains disabled, lifetime is not set for the effect
Actual result: block is enabled and Lifetime is applied to the effect
!image-2022-11-18-14-07-04-017.png!
Errror message:
(Null Asset) : Exception while compiling expression graph: System.ArgumentException: This method should not be called on a disabled block
at UnityEditor.VFX.VFXCodeGenerator.BuildBlock (UnityEditor.VFX.VFXContextCompiledData contextData, System.Collections.Generic.List`1[T] linkedEventOut, UnityEditor.VFX.VFXShaderWriter blockFunction, UnityEditor.VFX.VFXShaderWriter blockCallFunction, System.Collections.Generic.HashSet`1[T] blockDeclared, System.Collections.Generic.Dictionary`2[TKey,TValue] expressionToName, UnityEditor.VFX.VFXBlock block, System.Int32& blockIndex) [0x00360] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXCodeGenerator.cs:950
at UnityEditor.VFX.VFXCodeGenerator.Build (UnityEditor.VFX.VFXContext context, System.String templatePath, UnityEditor.VFX.VFXCompilationMode compilationMode, UnityEditor.VFX.VFXContextCompiledData contextData, System.Collections.Generic.HashSet`1[T] dependencies) [0x002fb] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXCodeGenerator.cs:602
at UnityEditor.VFX.VFXCodeGenerator.Build (UnityEditor.VFX.VFXContext context, UnityEditor.VFX.VFXCompilationMode compilationMode, UnityEditor.VFX.VFXContextCompiledData contextData, System.Collections.Generic.HashSet`1[T] dependencies) [0x0001e] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXCodeGenerator.cs:214
at UnityEditor.VFX.VFXGraphCompiledData.GenerateShaders (System.Collections.Generic.List`1[T] outGeneratedCodeData, UnityEditor.VFX.VFXExpressionGraph graph, System.Collections.Generic.IEnumerable`1[T] contexts, System.Collections.Generic.Dictionary`2[TKey,TValue] contextToCompiledData, UnityEditor.VFX.VFXCompilationMode compilationMode, System.Collections.Generic.HashSet`1[T] dependencies) [0x00079] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXGraphCompiledData.cs:768
at UnityEditor.VFX.VFXGraphCompiledData.Compile (UnityEditor.VFX.VFXCompilationMode compilationMode, System.Boolean forceShaderValidation) [0x00627] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXGraphCompiledData.cs:1114 : at UnityEditor.VFX.VFXCodeGenerator.BuildBlock (UnityEditor.VFX.VFXContextCompiledData contextData, System.Collections.Generic.List`1[T] linkedEventOut, UnityEditor.VFX.VFXShaderWriter blockFunction, UnityEditor.VFX.VFXShaderWriter blockCallFunction, System.Collections.Generic.HashSet`1[T] blockDeclared, System.Collections.Generic.Dictionary`2[TKey,TValue] expressionToName, UnityEditor.VFX.VFXBlock block, System.Int32& blockIndex) [0x00360] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXCodeGenerator.cs:950
at UnityEditor.VFX.VFXCodeGenerator.Build (UnityEditor.VFX.VFXContext context, System.String templatePath, UnityEditor.VFX.VFXCompilationMode compilationMode, UnityEditor.VFX.VFXContextCompiledData contextData, System.Collections.Generic.HashSet`1[T] dependencies) [0x002fb] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXCodeGenerator.cs:602
at UnityEditor.VFX.VFXCodeGenerator.Build (UnityEditor.VFX.VFXContext context, UnityEditor.VFX.VFXCompilationMode compilationMode, UnityEditor.VFX.VFXContextCompiledData contextData, System.Collections.Generic.HashSet`1[T] dependencies) [0x0001e] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXCodeGenerator.cs:214
at UnityEditor.VFX.VFXGraphCompiledData.GenerateShaders (System.Collections.Generic.List`1[T] outGeneratedCodeData, UnityEditor.VFX.VFXExpressionGraph graph, System.Collections.Generic.IEnumerable`1[T] contexts, System.Collections.Generic.Dictionary`2[TKey,TValue] contextToCompiledData, UnityEditor.VFX.VFXCompilationMode compilationMode, System.Collections.Generic.HashSet`1[T] dependencies) [0x00079] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXGraphCompiledData.cs:768
at UnityEditor.VFX.VFXGraphCompiledData.Compile (UnityEditor.VFX.VFXCompilationMode compilationMode, System.Boolean forceShaderValidation) [0x00627] in C:\Users\Vita\Test\Library\PackageCache\com.unity.visualeffectgraph@14.0.3\Editor\Compiler\VFXGraphCompiledData.cs:1114
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
Reproduced with: 2022.2.0a16.2406 + local packages trunk
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
- Camera Preview does not detect multiple cameras with same GameObject name
- Crash on TypeTreeIterator::Children() when renaming a corrupted asset while Asset Serialization is set to Mixed
- Cameras (Camera.targetDisplay) render only to Display 0 in the Player when Multi-Display setup is used and DX12 API is set
- [Vulkan] _CameraOpaqueTexture produces a feedback effect on Android Adreno devices when using Vulkan
- Loading animations are hitching or stopping when using "SceneManager.LoadSceneAsync" to load new scenes
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-7785