Skip to content

Commit

Permalink
[10.x.x][VFX] 10.3 backports (#3143)
Browse files Browse the repository at this point in the history
* Fix Event connected directly to Output Event (revival) #154

* Restore disabled 26_NonUnifomScale due to a wrong merge (need backport to 10.x.x)

* [HDRP] Fix debug view material (albedo/normal/...)

* Force ui update when shader might be reimported in StaticMeshOutput (#158)

* Don't create VFXGraph during import callbacks (#148)

* do not Create VFXGraph in import callbacks

* error when graph missing. Better test code for asset creation

* Select node on create (#166)

* Select node on create

* Fix for right click in block and add doesn't deselect clicked block

* fix for subgraph not being selected on drag and drop

* Select converted node/block after convert subgraph

* Fix for selection undo separate in some cases. Fixed flow anchor drag context selection.

* Fix for undo of add subgraph operator

* Dont flag dirty in vfxgraph is the model modified is a copy (#165)

* Added excludeFromTAA setting to VFX outputs

* Fix Custom Spawn serialization (#132)

* Fix case 1294180 : Error feedback throwing an error while changing capacity (#174)

* Fix Preset (with exclusion) (#177)

* Trick ExcludeFromPreset

Since this attribute is declared with "Inherited = false", we can't use it directly on VFXObject.
Extend the VFXInfo is valid to filter out preset.

* Fix missing ExcludeFromPreset for subgraph

* *Update changelog

* Fix 1276602 incorrect uchar pcache import (#129)

* Base Commit

* Updated Documentation with explicit limitations.

* Fixed incorrect Merge

* Add regression Test

* Removed Test as It can't handle Exceptions thrown in Custom Importers

* Fixed value divider

Co-authored-by: Thomas ICHÉ <peeweek@gmail.com>

* Update gradient test (#151)

* Update gradient test

* Update CHANGELOG.md

Co-authored-by: Julien Fryer <julienf@unity3d.com>

* Fix incorrect compilation condition for linux build (#184)

* Fix GPUEvent & SubGraph (#178)

* Fix SelectionHasCompleteSystems

Detect correctly if there are dependencies due to GPUEvent (or stripAttribute)

* Add allDependenciesIncludingNotCompilable in VFXData

This helper is usefull for UI + use it in SelectionHasCompleteSystems

* Add note without change the beahvior

* Remove debug ToArray()

* Sample Point Cache operator (#92)

* Fix Case 1223747 - NaN caused by normal bending (#181)

* [Subgraph] Prevent Pasting Context invalid subgraph (#191)

* Fix Mouse Event Binder in player (#175)

* Fix missing call to CreateVFXEventAttribute

OnValidate is only called in editor, in runtime, we should init cache data with OnEnable

* *Update changelog.md

* Vfx/docs/bugfixes (#188)

* Resolved 1272101

* Resolved 1264943

* Removed uncertainty around 'should'

* Resolved 1298031

* Added snippets file

* Resolved 1292127

* Fixed typos

* Resolved 1295296

Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>

* Update HDRP project assets

* Change VisualEffect inspector "Edit" button to "New" when no asset is set

* Spawn State documentation  (#195)

* Added Spawn State doc

* Fixed formatting

Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>

* Added what's new page and moved blocks out one level in the table of …

* backout update gradien test

* Update ref images + deactivate test 26

* update URP assets

* DEactivate test 32 + clean ribbon template vfx

Co-authored-by: Paul Demeulenaere <pauld@unity3d.com>
Co-authored-by: Tristan Genevet <tristan@unity3d.com>
Co-authored-by: Gabriel de la Cruz <gabriel.delacruz@unity3d.com>
Co-authored-by: Thomas Iché <thomasi@unity3d.com>
Co-authored-by: Thomas ICHÉ <peeweek@gmail.com>
Co-authored-by: Ludovic Theobald <ludovic.theobald@unity3d.com>
Co-authored-by: Lewis Jordan <lewisjordan@unity3d.com>
Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
  • Loading branch information
10 people committed Jan 17, 2021
1 parent d0c4535 commit bdfc890
Show file tree
Hide file tree
Showing 312 changed files with 23,804 additions and 3,404 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ MonoBehaviour:
blendMode: 1
useAlphaClipping: 0
generateMotionVector: 0
excludeFromTAA: 0
m_SubOutputs:
- {fileID: 8926484042661614564}
cullMode: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,24 @@ public void MultiLinkSpawnerSpawnerAfterSpawnerInit()
Assert.AreEqual(2, from.outputContexts.Count());
}


[Test] //see fogbugz 1269756
public void Link_Fail_From_Event_To_OutputEvent()
{
var from = ScriptableObject.CreateInstance<VFXBasicEvent>();
var to = ScriptableObject.CreateInstance<VFXOutputEvent>();
Assert.IsFalse(VFXContext.CanLink(from, to));
}

[Test]
public void Link_Fail_From_Event_To_Initialize()
{
//For now, we can't use direct link from event to initialize context.
var from = ScriptableObject.CreateInstance<VFXBasicEvent>();
var to = ScriptableObject.CreateInstance<VFXBasicInitialize>();
Assert.IsFalse(VFXContext.CanLink(from, to));
}

[Test]
public void Link_Fail()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,45 @@ public void ConvertToSubgraph()

window.graphView.controller = null;
}

[Test]
public void Subgraph_Event_Link_To_Spawn()
{
VFXViewWindow window = VFXViewWindow.GetWindow<VFXViewWindow>();
window.LoadAsset(AssetDatabase.LoadAssetAtPath<VisualEffectAsset>(testAssetName), null);

//Create Spawner in subgraph
{
var spawner = ScriptableObject.CreateInstance<VFXBasicSpawner>();
m_ViewController.graph.AddChild(spawner);
m_ViewController.LightApplyChanges();

var controller = window.graphView.Query<VFXContextUI>().ToList().Select(t => t.controller).Cast<Controller>();
Assert.AreEqual(1, controller.Count());
VFXConvertSubgraph.ConvertToSubgraphContext(window.graphView, controller, Rect.zero, testSubgraphSubAssetName);
}

var subGraphController = m_ViewController.allChildren.OfType<VFXContextController>().FirstOrDefault(o => o.model is VFXSubgraphContext);
Assert.IsNotNull(subGraphController);

//Create Event Context & Link the two input flow
var subGraphContext = subGraphController.model;
var eventContext = ScriptableObject.CreateInstance<VFXBasicEvent>();

Assert.IsTrue(VFXContext.CanLink(eventContext, subGraphContext, 0, 0));
Assert.IsTrue(VFXContext.CanLink(eventContext, subGraphContext, 0, 1));

eventContext.LinkTo(subGraphContext, 0, 0);
eventContext.LinkTo(subGraphContext, 0, 1);

var flow = eventContext.outputFlowSlot.First().link;
Assert.AreEqual(2, flow.Count());
Assert.IsTrue(flow.All(o => o.context == subGraphContext));
Assert.IsTrue(flow.Any(o => o.slotIndex == 0));
Assert.IsTrue(flow.Any(o => o.slotIndex == 1));

window.graphView.controller = null;
}
}
}
#endif

0 comments on commit bdfc890

Please sign in to comment.