Fix creating localization table on blank project

#1060
This commit is contained in:
Wojtek Figat
2023-05-05 14:54:42 +02:00
parent 315df12fbe
commit 37e8fa7b76
5 changed files with 14 additions and 6 deletions

View File

@@ -1002,17 +1002,12 @@ Asset* Content::load(const Guid& id, const ScriptingTypeHandle& type, AssetInfo&
}
#if ASSETS_LOADING_EXTRA_VERIFICATION
// Ensure we have valid asset info
ASSERT(assetInfo.TypeName.HasChars() && assetInfo.Path.HasChars());
// Check if file exists
if (!FileSystem::FileExists(assetInfo.Path))
{
LOG(Error, "Cannot find file '{0}'", assetInfo.Path);
return nullptr;
}
#endif
// Find asset factory based in its type

View File

@@ -35,6 +35,11 @@ namespace FlaxEngine
return null;
var dataTypeName = DataTypeName;
if (string.IsNullOrEmpty(dataTypeName))
{
Debug.LogError(string.Format("Missing typename of data in Json asset '{0}'.", Path), this);
return null;
}
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
for (int i = 0; i < assemblies.Length; i++)
{