Removed all test and sample application files, including Ghost.Entities.Test, Ghost.Graphics.Test, related XAML, assets, and project files. Updated solution to exclude deleted projects. Adjusted tests to comment out allocation manager usage. Updated ComponentDescriptorTests for camelCase property names and display name checks. Minor cleanup in core engine files for resource management and destructors. This streamlines the repository to focus on core engine/runtime code.
Refactored FMOD and FMOD Studio C# bindings to mark struct methods and property getters as readonly, improving immutability and enabling compiler optimizations. Updated usage of handle for readonly struct members. Simplified using statements with C# 8+ syntax. Updated test/component code: added EditorWorldService.RootNodes, disabled SharedComponentStore, revised EntityQueryTest/SerializationTest for new job scheduler, switched Mesh/Position to IComponentData, and adjusted SystemTest initialization. Minor code style cleanups throughout.
Refactored HandleDrawer to use a static UpdateUI method for clarity. Removed unused PropertyDrawerContext. Added EntityCreated event to EditorWorldService. Updated Hierarchy.xaml to modern TreeView drag-and-drop events. Overhauled drag-and-drop logic in Hierarchy.xaml.cs for better validation, cycle prevention, and scene graph consistency. Introduced helper methods for parent retrieval and scene graph rebuilding. Improved error handling throughout drag-and-drop operations.
This refactoring eliminates transient PropertyModel allocations and synchronizes UI data binding directly with the SceneGraph ComponentNode's persistent PropertyNode array. All PropertyDrawers have been updated to consume PropertyNode<T>. Additionally, this commit stages and includes various updates across the engine, graphics, and third-party wrappers as requested.
Refactor the ECS component inspector architecture to eliminate per-frame GC allocations (boxing).
- Replace object-based PropertyModel with generic PropertyModel<T>
- Introduce IPropertyModel interface for erased type holding
- Create PropertyDrawerRegistry and ComponentEditorRegistry
- Implement recursive nested struct support in PropertyDescriptor
- Fix EntityDrawer to update text dynamically on sync
- Delete obsolete object-boxing UI bindings
Replaced the hardcoded ComponentView approach with a data-driven ECS inspector that works directly with memory pointers. Introduced ComponentDescriptor and PropertyDescriptor to cache reflection metadata and C# struct layout offsets. Added InspectorSyncService which hooks into CompositionTarget.Rendering to safely synchronize oid* chunk memory to UI via PropertyBinding. Added pluggable PropertyDrawer architecture for rendering scalar properties (Float, Int, Bool, Enum). Updated EntityManager with GetEntityArchetype to easily iterate through component signatures for an entity.
Introduced AssetOpenHandlerAttribute for extension-based asset open logic.
Implemented async OpenAssetAsync methods in IAssetRegistry and AssetRegistry, using reflection to invoke handlers.
Updated ContentBrowser and ViewModel to support async asset opening.
Refactored Hierarchy initialization and XAML for clarity.
Logger now throws exceptions in DEBUG for errors/asserts.
Removed unused code and cleaned up usings.
- Overhauled scene loading with async, incremental, and cancellable operations using new types (SceneLoadStatus, SceneLoadOptions, etc.)
- Added thread-safe management of pending/loaded scenes and per-frame materialization budgeting
- Changed mesh header offsets from ulong to long; updated all related code to use stream positions directly
- Improved resource release logic for mesh/texture asset entries
- Refactored asset loading jobs and made reimport flag atomic
- Stream utility now always aligns memory blocks to 16 bytes
- Misc: fixed mock content headers, cleaned up code, and improved interface visibility
- SceneGraphBuilder: support initial entity names in tree
- EditorWorldService: full CRUD, events, scene graph rebuild
- SceneGraphSyncService: event-driven sync, node map, TryGetNode
- SceneSerializationService: serialize/deserialize names, sync
- Hierarchy UI: context menus, drag-and-drop, delete, no polling
- SceneManager: fix component type ID handling
- Add SceneGraphSync unit tests
- Remove obsolete asset handler/importer attributes
- Scene hierarchy is now reactive, robust, and testable
- Removed `[EditorInjectionAttribute]` and switched to direct service registration in `App.xaml.cs`
- Deleted `EditorIconSource` and moved icon handling to XAML
- Moved and enhanced `PathUtility` for path normalization and unique naming
- Renamed `SceneManager.UnloadScene` to `DestroyScene` for clarity
- Optimized `EntityQuery.Any()` with bitmask logic
- Improved `SceneGraphBuilder` and `SceneGraphSyncService` for better scene/entity handling
- Simplified entity field detection in `SceneSerializationService`
- Removed unused `TypeCache.Initialize()`
- Updated `ContentBrowser` to support scene asset creation and adjusted selection logic
- Upgraded NuGet package versions in project files
- Changed code generators to use `#if GHOST_EDITOR`
- Made `ShaderVariantCompiledHandler` safe
- Updated or removed scene graph planning docs to match new architecture
This commit overhauls the scene management and streaming architecture to use a chunk-based asynchronous loading paradigm, and completely decouples the graphics runtime from editor compilation services to eliminate circular dependencies.
Shader Bridge Decoupling:
- Resolved circular runtime dependency between Ghost.Graphics and Ghost.Editor.Core.
- Shifted EditorShaderCompilerBridge from querying EngineCore to a decoupled event-driven model using IShaderCompilationBridge.
- Introduced custom stack-friendly delegate ShaderVariantCompiledHandler to handle ReadOnlySpan<ShaderByteCode> compilation buffers while maintaining zero-allocation constraints.
- Updated ShaderLibrary to self-manage bytecode caching and stale pipeline eviction by listening to compiler events.
Scene & Streaming Overhaul:
- Re-implemented Scene.cs with a high-performance two-phase asynchronous scene loading architecture.
- Replaced outdated per-entity component processing with chunk-level shared data management using the ISharedComponent paradigm for SceneID.
- Optimized ECS Query.cs and Archetype.cs to handle streaming chunk operations efficiently.
- Updated AssetManager, ResourceStreamingProcessor, and asset entries (SceneAssetEntry, MeshAssetEntry, TextureAssetEntry) to support the new streaming workflow.
Refactored ECS to distinguish IComponentData and ISharedComponent. Updated all component implementations and method constraints accordingly. Changed SceneID handling to use shared components and updated related APIs and tests. Fixed BufferReader pointer advancement and initialized EntityManager managed storage.
Replaces GHOST_EDITOR with GHOST_SAFETY_CHECKS for debug checks. Introduces IBufferReader and StreamBufferReader to unify buffer/stream reading. Refactors SceneManager.ParseSceneData to support both buffer and stream sources, improving error handling and resource management. Updates usages of ReadMemory to ReadBuffer. Expands and modernizes SceneSerializationTests with async and expressive assertions. Adds ergonomic QueryBuilder methods. Applies minor code style and safety improvements throughout.
- Introduce ISharedComponent and remove legacy shared wrapper types
- Archetype now supports chunk groups for shared values
- EntityManager: Add/Remove/Set shared component APIs with correct migration
- EntityCommandBuffer: shared component operations supported
- ChunkView: GetSharedComponent<T>() for fast shared access
- ComponentSet/ComponentSetView: track type and shared data hashes
- Query and entity counting handle chunk groups/shared components
- Switch ReadOnlyUnsafeCollection to ReadOnlyView throughout
- Scene/SceneGraph: SceneID is now ushort, not struct
- BufferWriter/Reader and SpanWriter/Reader API improvements
- World: thread-local ECBs use UnsafeArray
- Add comprehensive unit tests for shared component features
- Update dependencies, clean up legacy code, improve comments
Refactored asset and scene loading to operate on streams instead of raw memory blocks, improving flexibility and efficiency. Replaced World.Clear(TimeData) with World.Reset() and updated all usages. Updated SceneManager and asset entry APIs to use streams, added new StreamUtility methods, and removed IDisposable from Scene. Refactored SystemManager to remove TimeData from lifecycle methods. Performed related code cleanups and updated tests.
Refactored Scene and SceneID to use a value-based approach, with SceneID now storing a ushort value instead of a Scene struct. Updated all usages to reference the new value and ID properties. Moved scene loading logic from SceneLoader (SceneAssetEntry.cs) into SceneManager for better consolidation. Updated entity creation, serialization, and tests to use the new SceneID pattern. Cleaned up obsolete code and improved comments regarding scene streaming and loading workflow. Added IDisposable to Scene and related structs for resource management.
- Switch Scene IDs to ushort, update invalid value logic
- Add thread safety to SceneManager and ComponentRegistry
- Add GHOST_ZERO_INIT_COMPONENT define for editor configs
- Update mesh header counts to use int, not uint
- Add Collect methods for archetype/component cleanup
- Add With/Without/AsView to ComponentSet for easier use
- Refactor World creation/destruction, version handling
- Refactor ResourceStreamingContext to use init-only props
- Add unit tests for entity queries and world lifecycle
- Minor code cleanups and formatting fixes
- Introduce Ghost.Engine.Streaming namespace and split asset entry logic into type-specific classes (TextureAssetEntry, MeshAssetEntry, SceneAssetEntry)
- Make AssetEntry abstract; add AssetEntryFactory for type dispatch
- Update AssetManager and ResourceStreamingProcessor for new entry model, supporting uploadable and processable assets
- Redesign scene/mesh asset loading, serialization, and binary formats with versioning (SceneContentHeader, MeshContentHeader)
- Move SceneLoadingType to Ghost.Engine and make public
- Inline performance-critical APIs with MethodImplOptions.AggressiveInlining
- Add deep cloning and improved resource management for Mesh and meshlet data
- Allow nullable log messages in Logger
- Update Misaki.HighPerformance package references
- Remove obsolete files (Asset.cs, ActivationHandler.cs, old mesh logic)
- Improve resource release logic in ResourceManager
- Update RenderContext and ResourceStreamingContext for new streaming model
- Add UnsafeArray/UnsafeList clone utilities
- Update scene serialization/deserialization for new format
- Update tests for new APIs, asset states, and formats
Do not serialize the SceneID component.
Generate a new SceneID when loading a scene file dynamically to prevent ID collisions.
Update related tests and scene graph builders.
Implement scene save/load for editor and runtime.
Editor JSON (.gscene) uses Utf8JsonWriter for inline component objects.
Runtime binary (.imported) stores marshalled component data with
entity field offset metadata for AOT-safe remapping.
- SceneSerializationService: save from EditorWorld, load into EditorWorld
- SceneAsset + SceneAssetHandler: .gscene import/pack pipeline
- AssetManager.Scene + SceneLoader: runtime binary deserialization
- Scene: [JsonConstructor] + [JsonIgnore] for round-trip
- Component: GetComponentIDByName for editor-side type lookup
- 10 unit tests (save, load, round-trip, unknown comp, invalid version)
Also guard DSLShaderCompiler editor code with #if GHOST_EDITOR,
add GC.SuppressFinalize to EditorWorldService, and switch Archetype
debug fields from #if GHOST_EDITOR to #if DEBUG.
Add hierarchical scene graph for editor with TreeView UI, runtime
HierarchyUtility for parent/child linked-list management, and
incremental sync between editor world and scene graph nodes.
- SceneGraphNode/SceneNode/EntityNode with World, Scene, Entity refs
- SceneGraphBuilder — construct tree from ECS World queries
- HierarchyUtility — SetParent, RemoveParent, IsAncestor, cascade destroy
- EditorWorldService + SceneGraphSyncService — editor world lifecycle & incremental sync
- Hierarchy.xaml — TreeView with DataTemplate + SceneGraphTemplateSelector
- 25 unit tests covering hierarchy ops and scene graph building
Refactored Hierarchy and Inspector panels into separate controls with improved styling and modularity. Cached EngineCore in EditorShaderCompilerBridge and updated shader cache logic for correctness. Renamed static field in PropertyField for consistency. Enhanced test coverage and fixed IDisposable implementation. Added XAML debugging properties for Debug_Editor and cleaned up obsolete scripts.
- Add AssetCatalog.EnumerateByTypes for filtered SQL queries
- Thread LocalKeywordSet through IShaderCompilationBridge API so the
bridge can resolve keyword bitmask to string defines at compile time
- Eager/lazy popluation of shader-id-to-asset-id map eliminating
full catalog scan per compilation miss
- Build keyword mapping from PassDescriptor groups to reconstruct
localIndex -> keywordName in the bridge
- Use CompileShaderPass extension for multi-stage AS/MS/PS compilation
with correct ShaderModel from descriptor
- Remove double-load of shader asset in compilation flow
- Update test mock to match new interface signature
Introduced EditorShaderCompilerBridge and IShaderCompilationBridge for async shader variant compilation and cache invalidation in the editor. Refactored ShaderLibrary to support the bridge, updating hash/caching logic and triggering compilation on cache misses. Changed pipeline library to use ulong content hashes and added stale pipeline eviction. Updated EngineCore and render code to integrate the new system. Added unit tests for ShaderLibrary cache and bridge behavior. Minor improvements to shader property code generation and test generator.
Refactor shader property system to support runtime reflection via ShaderPropertyType and ShaderPropertyFieldInfo. Introduce strongly-typed Texture2D/3D and Buffer handle structs. Update ShaderPropertiesGenerator to emit field metadata and register it. Move mesh content structs to AssetManager.Mesh.cs and mark as internal. Update DSLShaderCompiler and registry for new property API. Remove obsolete files and clean up namespaces. Add sample TestShaderProperty struct.
Added Debug_Editor/Release_Editor configs to all projects and solution. Refactored test utilities into Ghost.TestCore and updated references. Introduced DXCBindingTest for shader compilation. Updated conditional compilation to use GHOST_EDITOR. Improved platform mappings and performed minor code cleanup.
- Introduced AssetHandlerInfo struct for handler registration and lookup, enabling handler caching and decoupling instantiation from extension/type.
- Changed CustomAssetHandlerAttribute to use required named properties; updated source generator.
- Replaced HandlerTypeId with AssetTypeId throughout metadata, catalog, and sub-asset records for clarity.
- Refactored asset catalog to use connection pooling and local command creation for thread safety.
- Updated asset handler interfaces and implementations to align with new registration system and removed redundant properties.
- Migrated mesh import and meshlet building to async JobScheduler jobs; switched to TLSF allocator and improved safety checks.
- Made meshlet/LOD hierarchy building async and job-based with better memory management.
- Updated usages and tests for new APIs; refreshed project references and package versions.
- Improved documentation and code comments for clarity.
- Use `using` for MeshNode disposal in MeshAssetHandler
- Switch to `ref` UnsafeList in meshlet hierarchy methods for perf
- Ensure proper disposal of UnsafeList<int> and TempBinaryNode
- Add launchSettings.json for Ghost.Editor.Core debugging
- Update GhostEngine.slnx with platform mappings for Editor.Core
- Remove MHP_ENABLE_SAFETY_CHECKS from Debug|AnyCPU in csproj
- Unified FBX/OBJ logic into MeshAssetHandler and moved mesh node classes to MeshNode.cs
- Updated IAssetHandler to use CreateDefaultSettings(string ext)
- Made MeshAsset the abstract base, removed FBXAsset
- Switched mesh import/processing to use memory pools and explicit AllocationHandle
- Standardized manifest serialization options
- Improved error handling and normalized project paths
- Updated tests, project files, and AssetReference struct
- Standardize IImportableAssetHandler.ImportAsync to return sub-asset results
- Remove ISubAssetImportableAssetHandler, merge into main interface
- Update FBX/Texture handlers for new import contract
- Add StreamUtility for efficient (async) binary writes
- Refactor meshlet/LOD building to use ref structs and safe memory
- Use new streaming utilities in mesh import/export and tests
- AssetCatalog.Remove now recursively deletes sub-assets
- Improve asset registry file watcher for better change detection
- Log unhandled exceptions in App instead of breaking
- Add interpolated collection support to NativeMemoryManager
- Update project references and fix minor bugs
- Implement sub-asset import for mesh/model assets with manifest generation and deterministic GUIDs
- Extend AssetCatalog for sub-asset tracking and management
- Update AssetRegistry and ImportCoordinator for sub-asset workflows
- Add mesh asset parsing, GPU upload, and resource management
- Update mesh data structures for meshlet groups/hierarchy and LODs
- Improve tests for sub-asset import and mesh handling
- Enhance mocks for mesh asset testing and resource mapping
- Fix path handling and native DLL loading issues
- Miscellaneous bug fixes and refactoring
- Add new compile-time constants and update package versions
- Refactor AssetEntry upload logic to return Result and propagate errors
- Enhance error handling in ResourceStreamingProcessor uploads
- Make ResourceStreamingContext a readonly struct
- Implement IDisposable and finalizers for resource cleanup
- Overhaul AssetManagerTest with async tests and improved mocks
- Add mock implementations for graphics interfaces for testing
- Refactor MockingCommandBuffer and MockingResourceDatabase for better simulation
- Update internals visibility for unit testing
Modernize Misaki.HighPerformance dependencies. Refactor texture asset creation to use deferred resource slots via CreateEmpty(). Remove fallback resource fields and update texture resolution logic. Add CreateEmpty() to resource database interfaces. Introduce comprehensive unit tests with mocks for asset management. Enable unsafe code in tests.
Implemented meshlet cluster LOD hierarchy with binary-to-4-ary conversion. Updated MeshletHierarchyNode to 4-ary structure. Enhanced SIMD optimizations in GGX mipmap generation. ResourceManager mesh/material creation now supports dynamic buffers and optional naming. Upgraded SPMD package to 1.3.2. Performed minor code cleanups and doc improvements.
Major overhaul of material palette management:
- Added two-buffer indirection (PaletteOffsetBuffer, MaterialIndexBuffer) for GPU material lookup, with incremental upload and resizing.
- MaterialPaletteStore now tracks dirty ranges, supports deferred slot reclamation, and exposes CPU-side arrays for upload.
- ResourceManager manages persistent GPU buffers and uploads only dirty subranges per frame.
- Updated HLSL and C# structs to use palette indices.
- Refactored systems/components to use new palette index and release logic.
- Added RenderContext.UploadBufferRange for partial uploads.
Minor: Fixed StbIApi interop signatures, updated test namespaces, and performed code cleanups.
- Mesh import now builds full node hierarchy and splits geometry by material, with robust normal/tangent handling
- Meshlet generation supports material indices for correct assignment
- Refactored texture cube map compression and mipmap handling
- Updated asset handler registration to new namespace
- Enabled asset reimport on import events
- Improved code quality, resource management, and formatting
- Switched asset handler interfaces and implementations to use file paths instead of FileStreams for all operations.
- Refactored mesh asset structure and parsing, moved meshlet logic to MeshProcessor, and introduced hierarchical MeshNode types.
- Updated texture asset handling: switched to bits-per-channel, improved mipmap/cubemap generation, and SPMD HDRI support.
- Updated shader asset handlers to use file paths and split code compilation logic.
- Improved asset registry: added event debouncing, better path handling, and import time/hash tracking.
- Added source generator for IAssetSettings registration to support polymorphic JSON serialization.
- Updated dependencies and tests; various minor fixes and cleanups.
- Added LogViewer control to display log messages with filtering options.
- Integrated LogViewer into EditPage for better log management.
- Updated EngineEditorWindow to navigate to EditPage.
- Enhanced Logger implementation for improved performance and stack trace capturing.
- Introduced PathUtility for path normalization.
- Refactored AssetManager to correct shader asset type naming.
- Removed obsolete AssetHandlerRegistryTests and cleaned up related tests.
- Updated ImportCoordinatorTests for streamlined asset import process.
- 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
Refactored AssetHandlerRegistry to a static class and updated all usages. Replaced the docking-based EngineEditorWindow with a new grid/panel layout, adding modern toolbar, menu bar, and status bar. Introduced new divider styles and improved UI details. Removed obsolete and unused files, updated project references, and made minor code and UI/UX improvements.