Fixed AssetHandle serialization

- Serialize MeshComponents
- Fixed handling renamed files
This commit is contained in:
Simon Lübeß
2023-03-19 01:04:32 +01:00
parent c164aeecaa
commit edcec02e94
19 changed files with 324 additions and 321 deletions
+9 -1
View File
@@ -63,7 +63,15 @@ abstract class Asset : RefCounter
Deserialize.String!(reader, ref identifier, environment);
Asset asset = Content.GetAsset<Asset>(Content.LoadAsset(identifier));
AssetHandle handle = Content.LoadAsset(identifier);
if (handle == .Invalid)
{
value.Assign<Asset>(null);
return .Ok;
}
Asset asset = Content.GetAsset<Asset>(handle);
if (asset != null)
{