Merge branch 'fixing-strigview-gettext-uses' of git://github.com/Zbyl/FlaxEngine into Zbyl-fixing-strigview-gettext-uses
This commit is contained in:
@@ -384,12 +384,12 @@ Asset* Content::LoadAsyncInternal(const StringView& internalPath, MClass* type)
|
||||
CHECK_RETURN(type, nullptr);
|
||||
const auto scriptingType = Scripting::FindScriptingType(type->GetFullName());
|
||||
if (scriptingType)
|
||||
return LoadAsyncInternal(internalPath.GetText(), scriptingType);
|
||||
return LoadAsyncInternal(internalPath, scriptingType);
|
||||
LOG(Error, "Failed to find asset type '{0}'.", String(type->GetFullName()));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Asset* Content::LoadAsyncInternal(const Char* internalPath, const ScriptingTypeHandle& type)
|
||||
Asset* Content::LoadAsyncInternal(const StringView& internalPath, const ScriptingTypeHandle& type)
|
||||
{
|
||||
#if USE_EDITOR
|
||||
const String path = Globals::EngineContentFolder / internalPath + ASSET_FILES_EXTENSION_WITH_DOT;
|
||||
@@ -411,6 +411,11 @@ Asset* Content::LoadAsyncInternal(const Char* internalPath, const ScriptingTypeH
|
||||
return asset;
|
||||
}
|
||||
|
||||
Asset* Content::LoadAsyncInternal(const Char* internalPath, const ScriptingTypeHandle& type)
|
||||
{
|
||||
return LoadAsyncInternal(StringView(internalPath), type);
|
||||
}
|
||||
|
||||
FLAXENGINE_API Asset* LoadAsset(const Guid& id, const ScriptingTypeHandle& type)
|
||||
{
|
||||
return Content::LoadAsync(id, type);
|
||||
|
||||
@@ -187,6 +187,14 @@ public:
|
||||
/// <returns>The loaded asset or null if failed.</returns>
|
||||
API_FUNCTION(Attributes="HideInEditor") static Asset* LoadAsyncInternal(const StringView& internalPath, MClass* type);
|
||||
|
||||
/// <summary>
|
||||
/// Loads internal engine asset and holds it until it won't be referenced by any object. Returns null if asset is missing. Actual asset data loading is performed on a other thread in async.
|
||||
/// </summary>
|
||||
/// <param name="internalPath">The path of the asset relative to the engine internal content (excluding the extension).</param>
|
||||
/// <param name="type">The asset type. If loaded object has different type (excluding types derived from the given) the loading fails.</param>
|
||||
/// <returns>The loaded asset or null if failed.</returns>
|
||||
static Asset* LoadAsyncInternal(const StringView& internalPath, const ScriptingTypeHandle& type);
|
||||
|
||||
/// <summary>
|
||||
/// Loads internal engine asset and holds it until it won't be referenced by any object. Returns null if asset is missing. Actual asset data loading is performed on a other thread in async.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user