File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -907,21 +907,18 @@ void CompareAndUpdate()
907
907
// First write down what we want to do.
908
908
var updates = new UpdateList ( GetFbxHistory ( ) , m_fbxModel . transform , this ) ;
909
909
910
- // If we don't need to do anything, jump out now.
911
- if ( ! updates . NeedsUpdates ( ) ) {
912
- Log ( "{0}: no updates needed" , transform . name ) ;
913
- return ;
914
- }
915
-
916
- // We want to do something, so instantiate the prefab, work on the instance, then copy back.
910
+ // Instantiate the prefab, work on the instance, then copy back.
911
+ // We could optimize this out if we had nothing to do, but then the
912
+ // OnUpdate handler wouldn't always get called, and that makes for
913
+ // confusing API.
917
914
var prefabInstance = UnityEditor . PrefabUtility . InstantiatePrefab ( this . gameObject ) as GameObject ;
918
915
if ( ! prefabInstance ) {
919
916
throw new System . Exception ( string . Format ( "Failed to instantiate {0}; is it really a prefab?" ,
920
917
this . gameObject ) ) ;
921
918
}
922
919
var fbxPrefabInstance = prefabInstance . GetComponent < FbxPrefab > ( ) ;
923
920
924
- // Do ALL the things!
921
+ // Do ALL the things (potentially nothing).
925
922
var updatedObjects = updates . ImplementUpdates ( fbxPrefabInstance ) ;
926
923
927
924
// Tell listeners about it. They're free to make adjustments now.
You can’t perform that action at this time.
0 commit comments