Skip to content

Commit 612e601

Browse files
committed
code review fix
add comment about why component would be null
1 parent 472db1f commit 612e601

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Assets/FbxExporters/Editor/ConvertToModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ public static void CopyComponents(GameObject to, GameObject from){
337337
var originalComponents = new List<Component>(to.GetComponents<Component> ());
338338
// copy over meshes, materials, and nothing else
339339
foreach (var component in from.GetComponents<Component>()) {
340+
// ignore missing components
340341
if (component == null) {
341342
continue;
342343
}
@@ -352,6 +353,7 @@ public static void CopyComponents(GameObject to, GameObject from){
352353

353354
// Find the component to copy to.
354355
for (int i = 0, n = originalComponents.Count; i < n; i++) {
356+
// ignore missing components
355357
if (originalComponents [i] == null) {
356358
continue;
357359
}

0 commit comments

Comments
 (0)