Commit 5d9ade0
[VFX] Exception when deleting the whole graph
Jira: UUM-62094
How to reproduce:
1. Create a new Unity project using 3D (URP) or 3D (HDRP) Template
2. Make sure that project has Visual Effect Graph package installed
3. Create a new VFX Asset using Minimal System
4. Open VFX asset
5. In Update Particles block add/create Set Age Attribute
6. Select entire Graph and delete it
7. Observe the Console window
Expected result: no errors are thrown when entire Graph is deleted
Actual result: "NullReferenceException" errors are thrown when entire Graph is deleted
Reproducible with: 17.0.0 (2023.3.0a7), 17.0.2 (2023.3.0b4)
Not reproducible with: 17.0.0 (2023.3.0a6)
Note: not reproducible with other blocks like Collision, Force, FlipBook
Error:
> NullReferenceException: Object reference not set to an instance of an object
UnityEditor.VFX.ReadWritableAttributeProvider.GetAvailableString (UnityEditor.VFX.VFXModel model) (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Models/Parameters/VFXAttributeParameter.cs:42)
UnityEditor.VFX.UI.StringPropertyRM+<>c__DisplayClass2_2.<FindStringProvider>b__1 () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/GraphView/Views/Properties/StringPropertyRM.cs:84)
VFXSlotContainerEditor.DoInspectorGUI () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Inspector/VFXSlotContainerEditor.cs:59)
VFXSlotContainerEditor.OnInspectorGUI () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Inspector/VFXSlotContainerEditor.cs:315)
VFXBlockEditor.OnInspectorGUI () (at ./Library/PackageCache/com.unity.visualeffectgraph/Editor/Inspector/VFXBlockEditor.cs:23)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass74_0.<CreateInspectorElementUsingIMGUI>b__0 () (at /Users/bokken/build/output/unity/unity/Editor/Mono/UIElements/Inspector/InspectorElement.cs:729)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)1 parent 03116fa commit 5d9ade0
2 files changed
Lines changed: 36 additions & 1 deletion
File tree
- Packages/com.unity.visualeffectgraph/Editor/GraphView/Views
- Tests/SRPTests/Projects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
1167 | 1166 | | |
1168 | 1167 | | |
1169 | 1168 | | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1170 | 1175 | | |
1171 | 1176 | | |
1172 | 1177 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
945 | 946 | | |
946 | 947 | | |
947 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
948 | 978 | | |
949 | 979 | | |
950 | 980 | | |
| |||
0 commit comments