Fix missing asset register for new json resources

This commit is contained in:
Wojtek Figat
2021-04-23 10:53:27 +02:00
parent 6a1b4e547c
commit dc62586314
2 changed files with 27 additions and 19 deletions

View File

@@ -9,6 +9,7 @@
#include "Engine/Platform/FileSystem.h"
#include "Engine/Content/Content.h"
#include "Engine/Content/Storage/JsonStorageProxy.h"
#include "Engine/Content/Cache/AssetsCache.h"
#include "Engine/Content/AssetReference.h"
#include "Engine/Serialization/JsonWriters.h"
#include "Engine/Localization/LocalizedStringTable.h"
@@ -54,7 +55,7 @@ bool CreateJson::Create(const StringView& path, StringAnsiView& data, StringAnsi
LOG(Warning, "Failed to create directory");
return true;
}
}
}
}
rapidjson_flax::StringBuffer buffer;
@@ -91,6 +92,10 @@ bool CreateJson::Create(const StringView& path, StringAnsiView& data, StringAnsi
{
asset->Reload();
}
else
{
Content::GetRegistry()->RegisterAsset(id, String(dataTypename), path);
}
return false;
}