@@ -193,6 +193,7 @@ GameObject ModifySourceFbx()
193
193
{
194
194
// Generate this change:
195
195
// - delete parent1
196
+ // - move parent2
196
197
// - add parent3
197
198
// Simulate that we're doing this in Maya, so parent3 doesn't come
198
199
// with a collider.
@@ -201,6 +202,9 @@ GameObject ModifySourceFbx()
201
202
var parent3 = CreateGameObject ( "Parent3" , newModel . transform ) ;
202
203
Object . DestroyImmediate ( parent3 . GetComponent < BoxCollider > ( ) ) ;
203
204
205
+ var parent2 = newModel . transform . Find ( "Parent2" ) ;
206
+ parent2 . localPosition += new Vector3 ( 1 , 2 , 3 ) ;
207
+
204
208
// Export it to clobber the old FBX file.
205
209
// Sleep one second first to make sure the timestamp differs
206
210
// enough, so the asset database knows to reload it. I was getting
@@ -240,11 +244,10 @@ public void BasicTest() {
240
244
AssertAreIdentical ( m_originalRep , Rep ( m_manualPrefab ) ) ;
241
245
AssertAreIdentical ( m_originalHistory , History ( m_manualPrefab ) ) ;
242
246
243
- // Make sure we got the right changes.
247
+ // Make sure we got the right changes. Parent2 got its
248
+ // transform changed, Parent3 was created.
244
249
Assert . AreEqual ( 1 , updateSet . NumUpdates ) ;
245
250
Assert . That ( updateSet . Updated , Is . EquivalentTo ( new string [ ] {
246
- // TODO: UNI-24579 - we should only be seeing Parent3 here.
247
- // Parent2 is for a transform change, but it shouldn't have changed.
248
251
"Parent2" , "Parent3"
249
252
}
250
253
) ) ;
@@ -297,7 +300,7 @@ public void BasicTest() {
297
300
298
301
// Generate the answer we expect: the original but Parent1 and
299
302
// hierarchy are without collider. That's because we deleted them,
300
- // and got them back.
303
+ // and got them back. Parent2 should be back to the origin.
301
304
var expectedHierarchy = GameObject . Instantiate ( m_original ) ;
302
305
var parent1 = expectedHierarchy . transform . Find ( "Parent1" ) ;
303
306
foreach ( var collider in parent1 . GetComponentsInChildren < BoxCollider > ( ) ) {
0 commit comments