Refactor instance update flow, asset registry, and texture IO
- Renamed AddInstanceRequest to UpdateInstanceRequest; unified add/update logic for GPU instances - Introduced UpdateGPUInstanceSystem to handle changed MeshInstance components - Replaced QueryBuilder.Create() with QueryBuilder.New() for consistency - Switched versioning in ChunkView HasChanged/HasStructuralChanged to uint - Added extension-to-AssetType mapping in AssetHandlerRegistry - Changed TextureAssetHandler/Processor to use nint for image data - Enhanced DDS cache: read mipmap count, handle invalid files - Updated ProjectBrowserViewModel to use IAssetRegistry - Upgraded Misaki.HighPerformance and System.IO.Hashing packages - Set DependencyChainCapacity in JobSchedulerDesc - Fixed instance buffer logic in GhostRenderPipeline - Miscellaneous cleanups and namespace improvements
This commit is contained in:
@@ -130,7 +130,7 @@ public readonly unsafe ref struct ChunkView
|
||||
/// <param name="version">The version number to compare against the component's current version. Must be greater than or equal to zero.</param>
|
||||
/// <returns>true if the component's current version is less than or equal to the specified version; otherwise, false.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool HasChanged(Identifier<IComponent> id, int version)
|
||||
public bool HasChanged(Identifier<IComponent> id, uint version)
|
||||
{
|
||||
var layout = GetLayout(id);
|
||||
return version < _pVersion[layout.versionIndex];
|
||||
@@ -144,7 +144,7 @@ public readonly unsafe ref struct ChunkView
|
||||
/// <param name="version">The version number to compare against the current version of the component.</param>
|
||||
/// <returns>true if the component of space T has changed since the specified version; otherwise, false.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly bool HasChanged<T>(int version)
|
||||
public readonly bool HasChanged<T>(uint version)
|
||||
where T : unmanaged, IComponent
|
||||
{
|
||||
var layout = GetLayout(ComponentTypeID<T>.Value);
|
||||
@@ -157,7 +157,7 @@ public readonly unsafe ref struct ChunkView
|
||||
/// <param name="version">The version number to compare against the chunk's structural version.</param>
|
||||
/// <returns>true if the chunk's structure has changed since the specified version; otherwise, false.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly bool HasStructuralChanged(int version)
|
||||
public readonly bool HasStructuralChanged(uint version)
|
||||
{
|
||||
return version < _structuralVersion;
|
||||
}
|
||||
@@ -502,7 +502,7 @@ public ref partial struct QueryBuilder : IDisposable
|
||||
_rw = new UnsafeList<Identifier<IComponent>>(4, _scope.AllocationHandle);
|
||||
}
|
||||
|
||||
public static QueryBuilder Create()
|
||||
public static QueryBuilder New()
|
||||
{
|
||||
return new QueryBuilder();
|
||||
}
|
||||
|
||||
@@ -28,11 +28,17 @@ public abstract class SystemBase : ISystem
|
||||
{
|
||||
private UnsafeList<int> _requiredQueries;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the world that the system is running on currently.
|
||||
/// </summary>
|
||||
public World World
|
||||
{
|
||||
get; init;
|
||||
} = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the last version that the system update.
|
||||
/// </summary>
|
||||
public uint LastSystemVersion
|
||||
{
|
||||
get; internal set;
|
||||
|
||||
Reference in New Issue
Block a user