Skip to content

Commit f63f688

Browse files
committed
code review fix - use .ForEach instead of foreach()
1 parent e845d98 commit f63f688

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,16 +1699,16 @@ 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-
1703-
foreach(var uniConstraint in uniConstraints)
1702+
System.Array.ForEach(uniConstraints, uniConstraint =>
17041703
{
17051704
var uniConstraintType = uniConstraint.GetType();
17061705
if (!mapConstraintTypeToExportFunction.ContainsKey(uniConstraintType))
17071706
{
1708-
throw new System.NotImplementedException(uniConstraintType.Name);
1707+
Debug.LogWarningFormat("FbxExporter: Missing function to export constraint of type {0}", uniConstraintType.Name);
1708+
return;
17091709
}
17101710
mapConstraintTypeToExportFunction[uniConstraintType](uniConstraint, fbxScene, fbxNode);
1711-
}
1711+
});
17121712

17131713
return true;
17141714
}

0 commit comments

Comments
 (0)