-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [1.3.5] - 2024-10-04 ### Changed * Local optimization in EntityManager.CopyEntitiesFrom * Updated Mathematics dependency to version 1.3.2 * Updated Burst dependency to version 1.8.18 ### Fixed * Fixed misleading documentation for Baker.IsActiveAndEnabled * Improved build determinism by sorting inputs to build methods. * Exception thrown under certain circumstances when a system was destroyed could break various DOTS editor windows.
- Loading branch information
Unity Technologies
committed
Oct 4, 2024
1 parent
55ca11e
commit 18e63ee
Showing
25 changed files
with
1,756 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
Unity.Entities.PerformanceTests/CopyFromPerformanceTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using NUnit.Framework; | ||
using Unity.Collections; | ||
using Unity.Entities.Tests; | ||
using Unity.PerformanceTesting; | ||
using Assert = Unity.Assertions.Assert; | ||
|
||
namespace Unity.Entities.PerformanceTests | ||
{ | ||
[Category("Performance")] | ||
public class CopyFromPerformanceTests : EntityDifferTestFixture | ||
{ | ||
[Test, Performance] | ||
public void CopyEntitiesToOtherWorld([Values] bool collectDstEntities) | ||
{ | ||
var srcEntities = CollectionHelper.CreateNativeArray<Entity>(5000, SrcWorld.UpdateAllocator.ToAllocator); | ||
var dstEntities = CollectionHelper.CreateNativeArray<Entity>(srcEntities.Length, DstWorld.UpdateAllocator.ToAllocator); | ||
|
||
var archetype = SrcEntityManager.CreateArchetype(ComponentType.ReadWrite<EcsTestData>()); | ||
|
||
for (int ei = 0, ec = srcEntities.Length; ei < ec; ei++) | ||
{ | ||
srcEntities[ei] = SrcEntityManager.CreateEntity(archetype); | ||
SrcEntityManager.CreateEntity(archetype, 99); | ||
} | ||
|
||
Measure.Method(() => | ||
{ | ||
if (collectDstEntities) | ||
{ | ||
DstEntityManager.CopyEntitiesFrom(SrcEntityManager, srcEntities, dstEntities); | ||
} | ||
else | ||
{ | ||
DstEntityManager.CopyEntitiesFrom(SrcEntityManager, srcEntities); | ||
} | ||
}) | ||
.CleanUp(() => | ||
{ | ||
Assert.AreEqual(srcEntities.Length * 100, SrcEntityManager.Debug.EntityCount); | ||
Assert.AreEqual(srcEntities.Length, DstEntityManager.Debug.EntityCount); | ||
DstEntityManager.DestroyEntity(DstEntityManager.UniversalQuery); | ||
}) | ||
.MeasurementCount(10) | ||
.IterationsPerMeasurement(1) | ||
.WarmupCount(2) | ||
.Run(); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Unity.Entities.PerformanceTests/CopyFromPerformanceTests.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.