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:
@@ -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>
|
||||
|
||||
8
src/Runtime/Ghost.Core/Properties/launchSettings.json
Normal file
8
src/Runtime/Ghost.Core/Properties/launchSettings.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Ghost.Core": {
|
||||
"commandName": "Project",
|
||||
"debugEngines": "managed"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user