diff --git a/Scripts/Runtime/Entities/Data/IWorldUniqueID.cs b/Scripts/Runtime/Entities/Data/IWorldUniqueID.cs
index a4777737..a16b0810 100644
--- a/Scripts/Runtime/Entities/Data/IWorldUniqueID.cs
+++ b/Scripts/Runtime/Entities/Data/IWorldUniqueID.cs
@@ -3,13 +3,15 @@
namespace Anvil.Unity.DOTS.Entities
{
///
- /// Provides a unique ID
+ /// Provides a unique ID.
+ /// This ID is unique within the current World instance and guaranteed to be the same across all World instances.
///
/// The type of ID
public interface IWorldUniqueID
{
///
- /// The unique ID
+ /// The unique ID.
+ /// This ID is unique within the current World instance and guaranteed to be the same across all World instances.
///
public TWorldUniqueID WorldUniqueID { get; }
}
diff --git a/Scripts/Runtime/Entities/PersistentData/Data/Interface/IThreadPersistentData.cs b/Scripts/Runtime/Entities/PersistentData/Data/Interface/IThreadPersistentData.cs
index 39e8713a..e1a5b806 100644
--- a/Scripts/Runtime/Entities/PersistentData/Data/Interface/IThreadPersistentData.cs
+++ b/Scripts/Runtime/Entities/PersistentData/Data/Interface/IThreadPersistentData.cs
@@ -3,6 +3,7 @@
namespace Anvil.Unity.DOTS.Entities
{
+ // TODO: #283 - Devise a different name to better reflect the intended use and nature of this data type
///
/// An that is owned by the overall application and
/// used to provide a unique instance of the data that persists for a thread index.
@@ -19,7 +20,7 @@ public interface IThreadPersistentData : IAbstractPersistentData
/// The
/// A to wait on
public JobHandle AcquireAsync(out ThreadPersistentDataAccessor accessor);
-
+
///
/// Allows other jobs to use the underlying data for the
/// and ensures data integrity across those other usages.
@@ -34,11 +35,11 @@ public interface IThreadPersistentData : IAbstractPersistentData
///
/// The
public ThreadPersistentDataAccessor Acquire();
-
+
///
/// Allows other jobs or code to use to underlying data for the
/// and ensures data integrity across those other usages.
///
public void Release();
}
-}
+}
\ No newline at end of file
diff --git a/Scripts/Runtime/Entities/PersistentData/Data/ThreadPersistentData.cs b/Scripts/Runtime/Entities/PersistentData/Data/ThreadPersistentData.cs
index 90ef745b..3d8bd3c8 100644
--- a/Scripts/Runtime/Entities/PersistentData/Data/ThreadPersistentData.cs
+++ b/Scripts/Runtime/Entities/PersistentData/Data/ThreadPersistentData.cs
@@ -6,14 +6,15 @@
namespace Anvil.Unity.DOTS.Entities
{
+ // TODO: #283 - Devise a different name to better reflect the intended use and nature of this data type
internal class ThreadPersistentData : AbstractTypedPersistentData>,
IThreadPersistentData
where T : unmanaged, IThreadPersistentDataInstance
{
public ThreadPersistentData(IDataOwner dataOwner, string uniqueContextIdentifier)
: base(
- dataOwner,
- new UnsafeArray(ParallelAccessUtil.CollectionSizeForMaxThreads, Allocator.Persistent),
+ dataOwner,
+ new UnsafeArray(ParallelAccessUtil.CollectionSizeForMaxThreads, Allocator.Persistent),
uniqueContextIdentifier)
{
ref UnsafeArray data = ref Data;
@@ -58,4 +59,4 @@ public ThreadPersistentDataAccessor Acquire()
return CreateThreadPersistentDataAccessor();
}
}
-}
+}
\ No newline at end of file
diff --git a/Scripts/Runtime/Entities/PersistentData/PersistentDataSystem.cs b/Scripts/Runtime/Entities/PersistentData/PersistentDataSystem.cs
index 65ced9ee..8b753419 100644
--- a/Scripts/Runtime/Entities/PersistentData/PersistentDataSystem.cs
+++ b/Scripts/Runtime/Entities/PersistentData/PersistentDataSystem.cs
@@ -53,6 +53,7 @@ protected override void OnDestroy()
// INIT
//*************************************************************************************************************
+ // TODO: #283 - Devise a different name to better reflect the intended use and nature of this data type
public ThreadPersistentData GetOrCreateThreadPersistentData(string uniqueContextIdentifier)
where T : unmanaged, IThreadPersistentDataInstance
{
@@ -101,6 +102,7 @@ private EntityPersistentData CreateEntityPersistentDataInstance(IDataOwner
return new EntityPersistentData(dataOwner, uniqueContextIdentifier);
}
+ // TODO: #283 - Devise a different name to better reflect the intended use and nature of this data type
private ThreadPersistentData CreateThreadPersistentDataInstance(IDataOwner dataOwner, string uniqueContextIdentifier)
where T : unmanaged, IThreadPersistentDataInstance
{
@@ -118,6 +120,7 @@ JobHandle IEntityWorldMigrationObserver.MigrateTo(JobHandle dependsOn, World des
NativeArray migrationDependencies = new NativeArray(m_EntityPersistentData.Count, Allocator.Temp);
int index = 0;
+ // TODO: #283 - Devise a different name to better reflect the intended use and nature of this data type
//We only need to migrate EntityPersistentData.
//ThreadPersistentData is global to the app and doesn't need to be migrated because no jobs or data should be in flight during migration.
foreach (KeyValuePair entry in m_EntityPersistentData)
@@ -149,4 +152,4 @@ private void Debug_EnsureOtherWorldPersistentDataSystemExists(World destinationW
}
}
}
-}
+}
\ No newline at end of file