-
Notifications
You must be signed in to change notification settings - Fork 855
[VFX] Importer and compilation various fixes #5371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9badd19
e178478
c0dd817
856de5e
958c72a
43439eb
eb3e4d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,7 @@ private void SynchronizeUndoRedoState() | |
m_reentrant = true; | ||
ExpressionGraphDirty = true; | ||
model.GetOrCreateGraph().UpdateSubAssets(); | ||
EditorUtility.SetDirty(graph); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
NotifyUpdate(); | ||
m_reentrant = false; | ||
m_graphUndoStack.CleanDirtyState(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,7 +154,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); | ||
|
@@ -1562,7 +1562,10 @@ void OnSave() | |
foreach (var graph in graphToSave) | ||
{ | ||
if (EditorUtility.IsDirty(graph) || UnityEngine.Object.ReferenceEquals(graph, controller.graph)) | ||
{ | ||
graph.UpdateSubAssets(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The missing UpdateSubAssets reminds me an old debug, see this conversation |
||
graph.GetResource().WriteAsset(); | ||
} | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optionally, if |
||
} | ||
} | ||
|
||
protected override VFXExpression[] BuildExpression(VFXExpression[] inputExpression) | ||
{ | ||
var expressions = builtInParameterEnumerable.Select(b => s_BuiltInInfo[b].expression); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized we assumed the previous
AssetDatabase.ImportAsset
was synchronous here. I don't think it's possible to have an asynchronous import of the vfx anyway.