Skip to content

Commit ea6c83c

Browse files
committed
Revert unnecessary change from bad merge.
1 parent 6e8f784 commit ea6c83c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetcodeIntegrationTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,16 +1827,16 @@ protected void DestroySceneNetworkObjects()
18271827
// and then destroying the ghostAdapter prior to destroying
18281828
// a hybrid prefab.
18291829
var ghostAdapter = networkObject.GetComponent<GhostAdapter>();
1830-
if (ghostAdapter != null && ghostAdapter.prefabReference != null)
1830+
if (ghostAdapter != null)
18311831
{
1832-
var prefabReference = ghostAdapter.prefabReference;
1833-
prefabReference.Prefab = null;
1834-
ghostAdapter.prefabReference = null;
1835-
Object.Destroy(prefabReference);
1836-
Object.Destroy(ghostAdapter);
1837-
// Only normally destroy hybrid-spawned objects.
1832+
if (ghostAdapter.prefabReference != null)
1833+
{
1834+
var prefabReference = ghostAdapter.prefabReference;
1835+
prefabReference.Prefab = null;
1836+
ghostAdapter.prefabReference = null;
1837+
Object.Destroy(prefabReference);
1838+
}
18381839
Object.Destroy(networkObject.gameObject);
1839-
continue;
18401840
}
18411841
#endif
18421842
// Destroy the GameObject that holds the NetworkObject component

0 commit comments

Comments
 (0)