Skip to content

Commit 00e9325

Browse files
committed
code review fix - use loop instead of Array.ForEach
1 parent f63f688 commit 00e9325

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,16 +1699,17 @@ protected bool ExportConstraints (GameObject unityGo, FbxScene fbxScene, FbxNode
16991699

17001700
// check if GameObject has one of the 5 supported constraints: aim, parent, position, rotation, scale
17011701
var uniConstraints = unityGo.GetComponents<IConstraint>();
1702-
System.Array.ForEach(uniConstraints, uniConstraint =>
1702+
1703+
foreach(var uniConstraint in uniConstraints)
17031704
{
17041705
var uniConstraintType = uniConstraint.GetType();
17051706
if (!mapConstraintTypeToExportFunction.ContainsKey(uniConstraintType))
17061707
{
17071708
Debug.LogWarningFormat("FbxExporter: Missing function to export constraint of type {0}", uniConstraintType.Name);
1708-
return;
1709+
continue;
17091710
}
17101711
mapConstraintTypeToExportFunction[uniConstraintType](uniConstraint, fbxScene, fbxNode);
1711-
});
1712+
}
17121713

17131714
return true;
17141715
}

0 commit comments

Comments
 (0)