forked from Misaki/GhostEngine
- Updated Misaki.HighPerformance package versions in Core and Graphics projects. - Added IsTrimmable to Ghost.Engine.csproj for trimming support. - Renamed GetOrRegisterComponent to GetOrRegisterComponentID and updated all usages. - Component registration codegen now uses a static class with [ModuleInitializer], no longer requires [EngineEntry]. - Improved JSON serialization: added string support, introduced Utf8JsonObjectScope/ArrayScope, and new extension methods for cleaner JSON writing. - Removed [SkipLocalsInit] from Hierarchy and LocalToWorld. - Fixed Entity.Invalid to use INVALID_ID for both fields. - Minor cleanup: clarified comments, reorganized Ghost.Generator in solution, and disabled component serialization generator.
24 lines
531 B
C#
24 lines
531 B
C#
using Ghost.Engine.Editor;
|
|
using Ghost.Entities;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Ghost.Engine.Components;
|
|
|
|
[HideEditor]
|
|
public struct Hierarchy : IComponent
|
|
{
|
|
public Entity parent;
|
|
public Entity firstChild;
|
|
public Entity nextSibling;
|
|
|
|
public static Hierarchy Root
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
get => new()
|
|
{
|
|
parent = Entity.Invalid,
|
|
firstChild = Entity.Invalid,
|
|
nextSibling = Entity.Invalid
|
|
};
|
|
}
|
|
} |