@@ -819,6 +819,10 @@ void ClassifyComponents(Transform newFbx, Transform prefab)
819
819
// Already updated => skip.
820
820
continue ;
821
821
}
822
+ Debug . Log ( "update component for: " + name + ": " + typename ) ;
823
+ if ( i < oldN ) {
824
+ Debug . LogWarning ( "oldvalue : " + oldValues [ i ] + ", new value: " + newValue ) ;
825
+ }
822
826
Append ( m_componentsToUpdate , name ,
823
827
new ComponentValue ( componentTypes [ typename ] , newValue ) ) ;
824
828
} else {
@@ -910,6 +914,7 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
910
914
911
915
Log ( "{0}: created new GameObject" , name ) ;
912
916
updatedNodes . Add ( newNode ) ;
917
+ Debug . LogWarning ( "created: " + newNode . name ) ;
913
918
}
914
919
915
920
// Implement the reparenting in two phases to avoid making loops, e.g.
@@ -937,6 +942,7 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
937
942
938
943
Log ( "changed {0} parent to {1}" , name , parentNode . name ) ;
939
944
updatedNodes . Add ( childNode . gameObject ) ;
945
+ Debug . LogWarning ( "changed name: " + childNode . name ) ;
940
946
}
941
947
942
948
// Destroy the old nodes. Remember that DestroyImmediate recursively
@@ -957,6 +963,7 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
957
963
var typesToDestroy = kvp . Value ;
958
964
var prefabXfo = prefabNodes [ nodeName ] ;
959
965
updatedNodes . Add ( prefabXfo . gameObject ) ;
966
+ Debug . LogWarning ( "destroy component: " + prefabXfo . name ) ;
960
967
961
968
foreach ( var componentType in typesToDestroy ) {
962
969
var component = prefabXfo . GetComponent ( componentType ) ;
@@ -973,6 +980,7 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
973
980
var fbxComponents = kvp . Value ;
974
981
var prefabXfo = prefabNodes [ nodeName ] ;
975
982
updatedNodes . Add ( prefabXfo . gameObject ) ;
983
+ Debug . LogWarning ( "update component: " + prefabXfo . name ) ;
976
984
977
985
// Copy the components once so we can match them up even if there's multiple fbxComponents.
978
986
List < Component > prefabComponents = new List < Component > ( prefabXfo . GetComponents < Component > ( ) ) ;
@@ -991,6 +999,8 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
991
999
Log ( "created component {0}:{1}" , nodeName , fbxComponent . t ) ;
992
1000
}
993
1001
1002
+ Debug . LogWarning ( "prefab component: " + prefabComponent . GetType ( ) . Name ) ;
1003
+
994
1004
//If the prefabComponent has not been assigned yet,
995
1005
//it means that we couldn't find it, and that we tried to add it but that it seems like it already exists.
996
1006
if ( ! prefabComponent ) {
0 commit comments