diff --git a/Assets/Mirror/Tests/Performance/Runtime/ULocalConnectionPerformance.cs b/Assets/Mirror/Tests/Performance/Runtime/ULocalConnectionPerformance.cs index 95a3b14f4..578118603 100644 --- a/Assets/Mirror/Tests/Performance/Runtime/ULocalConnectionPerformance.cs +++ b/Assets/Mirror/Tests/Performance/Runtime/ULocalConnectionPerformance.cs @@ -16,6 +16,13 @@ public override void Awake() playerPrefab = new GameObject("testPlayerPrefab", typeof(NetworkIdentity)); base.Awake(); } + public override void OnDestroy() + { + base.OnDestroy(); + + // clean up new object created in awake + Destroy(playerPrefab); + } } [Category("Performance")] public class ULocalConnectionPerformance