Skip to content
5 changes: 4 additions & 1 deletion com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Extract position from a transform is wrong on GPU [Case 1353533](https://issuetracker.unity3d.com/product/unity/issues/guid/1353533/)
- Fix rendering artifacts on some mobile devices [Case 1149057](https://issuetracker.unity3d.com/product/unity/issues/guid/1149057/)
- Fix compilation failure on OpenGLES [Case 1348666](https://issuetracker.unity3d.com/product/unity/issues/guid/1348666/)
- Fix potential infinite compilation when using subgraphs [Case 1346576](https://issuetracker.unity3d.com/product/unity/issues/guid/1346576/)
- Prevent out of sync serialization of VFX assets that could cause the asset to be dirtied without reason
- Fix undetermitism in space with LocalToWorld and WorldToLocal operators [Case 1355820](https://issuetracker.unity3d.com/product/unity/issues/guid/1355820/)

## [10.6.0] - 2021-04-29
### Fixed
Expand Down Expand Up @@ -56,7 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- 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/)
- Fixed shader compilation errors with textures in shader graph [Case 1309219](https://issuetracker.unity3d.com/product/unity/issues/guid/1309219/)
- Fixed issue with VFX using incorrect buffer type for strip data

## [10.3.1] - 2021-01-26

Version Updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ void Update()
{
VFXGraph.compileReporter = reporter;
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(graphView.controller.model));
graph.SetExpressionGraphDirty(false); // As are implemented subgraph now, compiling dependents chain can reset dirty flag on used subgraphs, which will make an infinite loop, this is bad!
VFXGraph.compileReporter = null;
}
VFXGraph.explicitCompile = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ private void SynchronizeUndoRedoState()
m_reentrant = true;
ExpressionGraphDirty = true;
model.GetOrCreateGraph().UpdateSubAssets();
EditorUtility.SetDirty(graph);
NotifyUpdate();
m_reentrant = false;
m_graphUndoStack.CleanDirtyState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Controller IControlledElement.controller
void DisconnectController()
{
if (controller.model && controller.graph)
controller.graph.SetCompilationMode(VFXCompilationMode.Runtime);
controller.graph.SetCompilationMode(VFXViewPreference.forceEditionCompilation ? VFXCompilationMode.Edition : VFXCompilationMode.Runtime);


m_Controller.UnregisterHandler(this);
Expand Down Expand Up @@ -1441,7 +1441,10 @@ void OnSave()
foreach(var graph in graphToSave)
{
if (EditorUtility.IsDirty(graph) || UnityEngine.Object.ReferenceEquals(graph, controller.graph))
{
graph.UpdateSubAssets();
graph.GetResource().WriteAsset();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public override VFXCoordinateSpace GetOutputSpaceFromSlot(VFXSlot outputSlot)
}
}
}
if (space == (VFXCoordinateSpace)int.MaxValue)
space = outputSlot.space;

return space;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,19 @@ override public string name
}
}

public override VFXCoordinateSpace GetOutputSpaceFromSlot(VFXSlot outputSlot)
{
switch (m_BuiltInParameters)
{
case BuiltInFlag.LocalToWorld:
return VFXCoordinateSpace.Local;
case BuiltInFlag.WorldToLocal:
return VFXCoordinateSpace.World;
default:
return (VFXCoordinateSpace)int.MaxValue;
}
}

protected override VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
{
var expressions = builtInParameterEnumerable.Select(b => s_BuiltInInfo[b].expression);
Expand Down
2 changes: 1 addition & 1 deletion com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static string[] OnWillSaveAssets(string[] paths)
var vfxResource = VisualEffectResource.GetResourceAtPath(path);
if (vfxResource != null)
{
var graph = vfxResource.GetOrCreateGraph();
vfxResource.GetOrCreateGraph().UpdateSubAssets();
vfxResource.WriteAsset(); // write asset as the AssetDatabase won't do it.
}
}
Expand Down