forked from Misaki/GhostEngine
ECS refactor: new ComponentSet, serialization, generators
Major ECS API overhaul: added ComponentSet, refactored ComponentRegistry, and updated all entity/component creation methods. Introduced robust custom serialization infrastructure and per-component source generators for registration and (de)serialization. Updated editor, engine, and test code to use new APIs. Improved code quality, naming, and performance throughout. Removed obsolete code and updated dependencies.
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
using Ghost.Engine.Editor;
|
||||
using Ghost.SparseEntities;
|
||||
using Ghost.SparseEntities.Components;
|
||||
using Ghost.Entities;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ghost.Engine.Components;
|
||||
|
||||
[SkipLocalsInit]
|
||||
[HideEditor]
|
||||
public struct Hierarchy : IComponentData
|
||||
public struct Hierarchy : IComponent
|
||||
{
|
||||
public Entity parent;
|
||||
public Entity firstChild;
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
using Ghost.Engine.Utilities;
|
||||
using Ghost.SparseEntities.Components;
|
||||
using System.Numerics;
|
||||
using Ghost.Entities;
|
||||
using Misaki.HighPerformance.Mathematics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ghost.Engine.Components;
|
||||
|
||||
[SkipLocalsInit]
|
||||
public struct LocalToWorld : IComponentData
|
||||
public struct LocalToWorld : IComponent
|
||||
{
|
||||
public Matrix4x4 matrix;
|
||||
|
||||
public static LocalToWorld Identity
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get => new()
|
||||
{
|
||||
matrix = MatrixUtility.CreateTRS(Vector3.Zero, Quaternion.Identity, Vector3.One)
|
||||
};
|
||||
}
|
||||
public float4x4 matrix;
|
||||
}
|
||||
Reference in New Issue
Block a user