Skip to content

Commit a981a66

Browse files
[VFX] 10.x.x backports (#4208)
Fixed: Target GameObject attach button does not allow attaching a valid VFX if the last selection was invalid. Case 1312178 Deleting flow edge between Init and Update throw an invalid opeation exception Case 1315593 Having more than five GPU Event output leads to "unexpected token 'if" at compilation Case 1323434 Deleted properties still show up in the inspector Case 1320952 Regression with some settings not always triggering a recompilation Case 1322844 Exception in VFXFilterWindow if search field is empty Case 1235269 Some doc updates
1 parent c26bf3e commit a981a66

File tree

31 files changed

+437
-171
lines changed

31 files changed

+437
-171
lines changed

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXGUITests.cs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public void DestroyTestAssets()
3535

3636
for (int i = 0; i < testAssetCount; ++i)
3737
DestroyTestAsset("GUITest" + i);
38+
39+
VFXTestCommon.DeleteAllTemporaryGraph();
3840
}
3941

4042
public static void RunGUITests()
@@ -402,6 +404,50 @@ public void CreateAllDataEdgesTest()
402404
EditTestAsset(6);
403405
CreateDataEdges(CreateAllOutputBlocks(), CreateAllParameters());
404406
}
407+
408+
409+
public static readonly bool[] Create_Simple_Graph_Then_Remove_Edget_Between_Init_And_Update_TestCase = { true, false };
410+
//Cover issue from 1315593 with system name
411+
[UnityTest]
412+
public IEnumerator Create_Simple_Graph_Then_Remove_Edget_Between_Init_And_Update([ValueSource(nameof(Create_Simple_Graph_Then_Remove_Edget_Between_Init_And_Update_TestCase))] bool autoCompile)
413+
{
414+
var graph = VFXTestCommon.MakeTemporaryGraph();
415+
var path = AssetDatabase.GetAssetPath(graph);
416+
417+
var spawner = ScriptableObject.CreateInstance<VFXBasicSpawner>();
418+
419+
var init = ScriptableObject.CreateInstance<VFXBasicInitialize>();
420+
var update = ScriptableObject.CreateInstance<VFXBasicUpdate>();
421+
var output = ScriptableObject.CreateInstance<VFXPlanarPrimitiveOutput>();
422+
423+
graph.AddChild(spawner);
424+
graph.AddChild(init);
425+
graph.AddChild(update);
426+
graph.AddChild(output);
427+
428+
init.LinkFrom(spawner);
429+
update.LinkFrom(init);
430+
output.LinkFrom(update);
431+
AssetDatabase.ImportAsset(path);
432+
yield return null;
433+
434+
//The issue is actually visible in VFXView
435+
var window = EditorWindow.GetWindow<VFXViewWindow>();
436+
window.Show();
437+
var bckpAutoCompile = window.autoCompile;
438+
window.autoCompile = autoCompile;
439+
window.LoadAsset(graph.GetResource().asset, null);
440+
441+
//update.UnlinkFrom(init); //Doesn't reproduce the issue
442+
var allFlowEdges = window.graphView.controller.allChildren.OfType<VFXFlowEdgeController>().ToArray();
443+
var flowEdgeToDelete = allFlowEdges.Where(o => o.output.context.model.contextType == VFXContextType.Init && o.input.context.model.contextType == VFXContextType.Update).ToArray();
444+
Assert.AreEqual(1u, flowEdgeToDelete.Length);
445+
window.graphView.controller.Remove(flowEdgeToDelete);
446+
window.graphView.controller.NotifyUpdate(); //<= This function will indirectly try to access system name before update (called by VFXView.Update
447+
yield return null;
448+
449+
window.autoCompile = bckpAutoCompile;
450+
}
405451
}
406452
}
407453
#endif

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/Shadergraph/SampleScene/ShadergraphSampleScene/ReflectionProbe-0.exr.meta

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [10.5.0] - 2020-03-15
8-
9-
Version Updated
10-
The version number for this package has increased due to a version update of a related graphics package.
8+
### Fixed
9+
- Target GameObject attach button does not allow attaching a valid VFX if the last selection was invalid. [Case 1312178](https://issuetracker.unity3d.com/product/unity/issues/guid/1312178/)
10+
- Deleting flow edge between Init and Update throw an invalid opeation exception [Case 1315593](https://issuetracker.unity3d.com/product/unity/issues/guid/1315593/)
11+
- Having more than five GPU Event output leads to "unexpected token 'if" at compilation [Case 1323434](https://issuetracker.unity3d.com/product/unity/issues/guid/1323434/)
12+
- Deleted properties still show up in the inspector [Case 1320952](https://issuetracker.unity3d.com/product/unity/issues/guid/1320952/)
13+
- Regression with some settings not always triggering a recompilation [Case 1322844](https://issuetracker.unity3d.com/product/unity/issues/guid/1322844/)
14+
- Exception in VFXFilterWindow if search field is empty [Case 1235269](https://issuetracker.unity3d.com/product/unity/issues/guid/1235269/)
1115

1216
## [10.4.0] - 2020-01-26
1317
### Changed
1418
- Sphere and Cube outputs are now experimental
1519
- Property Binder : Handle Remove Component removing linked hidden scriptable objectfields
1620
- Property Binder : Prevent multiple VFXPropertyBinder within the same game object
21+
- Tidy up of platform abstraction code for random number generation, requires a dependency on com.unity.render-pipelines.core for those abstractions.
1722

1823
### Fixed
1924
- VFXEventBinderBase throwing a null reference exception in runtime
@@ -34,9 +39,6 @@ The version number for this package has increased due to a version update of a r
3439
- Deleting a context node and a block while both are selected throws a null ref exception. [Case 315578](https://issuetracker.unity3d.com/product/unity/issues/guid/1315578/)
3540
- Fixed shader compilation errors with textures in shader graph [Case 1309219](https://issuetracker.unity3d.com/product/unity/issues/guid/1309219/)
3641
- Fixed issue with VFX using incorrect buffer type for strip data
37-
38-
### Changed
39-
- Tidy up of platform abstraction code for random number generation, requires a dependency on com.unity.render-pipelines.core for those abstractions.
4042

4143
## [10.3.1] - 2020-01-26
4244

com.unity.visualeffectgraph/Documentation~/Block-SetAttributeFromMap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The **Set Attribute from Map** Block is a generic Block that calculates values b
66

77
To achieve different results, this Block can use various sampling modes. The sampling modes are:
88

9-
- **Index**, **IndexRelative**, and **Sequential** sample modes use particle indices to sample the pixels of the texture. These modes can sample [Point Caches](PointCaches.md) or [Attribute Maps](PropertyBinders.md) in various ways.
9+
- **Index**, **IndexRelative**, and **Sequential** sample modes use particle indices to sample the pixels of the texture. These modes can sample [Point Caches](point-cache-in-vfx-graph.md) or [Attribute Maps](PropertyBinders.md) in various ways.
1010
- **Sample2DLOD** and **Sample3DLOD** sample modes use 2D and 3D coordinates and a LOD factor to sample the texture. You can use these modes for projection of various values such as color or depth.
1111
- **Random** and **RandomUniformPerParticle** sample modes allow you to fetch random values from a pool of values stored in a texture, such as Point Caches or Attribute Maps.
1212

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)