Refactor mesh asset handling and memory allocation

- 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
This commit is contained in:
2026-05-05 21:12:15 +09:00
parent 5de480e231
commit 744b058e6a
15 changed files with 355 additions and 285 deletions

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants);MHP_ENABLE_SAFETY_CHECKS;MHP_ENABLE_MIMALLOC;MHP_FASTMATH;MHP_ENABLE_STACKTRACE</DefineConstants>
<DefineConstants>$(DefineConstants);MHP_ENABLE_SAFETY_CHECKS;MHP_ENABLE_MIMALLOC;MHP_FASTMATH</DefineConstants>
<IsAotCompatible>True</IsAotCompatible>
<IsTrimmable>True</IsTrimmable>
</PropertyGroup>

View File

@@ -0,0 +1,8 @@
{
"profiles": {
"Ghost.Core": {
"commandName": "Project",
"debugEngines": "managed"
}
}
}

View File

@@ -19,6 +19,16 @@ public readonly struct AssetReference : IEquatable<AssetReference>
public readonly bool IsInternal => _value >= 0;
public readonly bool IsExternal => _value < 0;
public AssetReference(int index, bool isInternal)
{
if (index < 0)
{
throw new ArgumentOutOfRangeException(nameof(index), "Index must be non-negative");
}
_value = isInternal ? index + 1 : -(index + 1);
}
public bool Equals(AssetReference other)
{
return _value == other._value;