Skip to content

Commit e8a5ada

Browse files
author
Robert Dorn
committed
added TopologySort before value conversion checks, otherwise we get wrong results in resolving type detection
1 parent 3d26e8d commit e8a5ada

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Editor/Scripts/Interactivity/VisualScriptingExport/VisualScriptingExportContext.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,14 +658,17 @@ internal void AfterSceneExport(GLTFSceneExporter exporter, GLTFRoot gltfRoot, Li
658658

659659
TriggerInterfaceExportCallbacks();
660660

661+
// For Value Conversion, we need to presort the nodes, otherwise we might get wrong results
662+
TopologicalSort();
661663
CheckForImplicitValueConversions();
662664

663665
CheckForCircularFlows();
664666

665667
if (plugin.cleanUpAndOptimizeExportedGraph)
666668
CleanUp();
667669

668-
PostIndexTopologicalSort();
670+
// Final Topological Sort
671+
TopologicalSort();
669672

670673
CollectOpDeclarations();
671674

@@ -758,7 +761,7 @@ private void OutputUnitLogs()
758761
Debug.LogWarning("Exported with warnings/errors: "+System.Environment.NewLine+ sb.ToString());
759762
}
760763

761-
private void PostIndexTopologicalSort()
764+
private void TopologicalSort()
762765
{
763766
// Resort the nodes after resolving the connections
764767
var sorted = PostTopologicalSort();

0 commit comments

Comments
 (0)