Improve #2270 by moving mehtod to cpp file
This commit is contained in:
@@ -198,6 +198,12 @@ void ContentService::Dispose()
|
|||||||
Graphics::DisposeDevice();
|
Graphics::DisposeDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IAssetFactory::Collection& IAssetFactory::Get()
|
||||||
|
{
|
||||||
|
static Collection Factories(1024);
|
||||||
|
return Factories;
|
||||||
|
}
|
||||||
|
|
||||||
AssetsCache* Content::GetRegistry()
|
AssetsCache* Content::GetRegistry()
|
||||||
{
|
{
|
||||||
return &Cache;
|
return &Cache;
|
||||||
@@ -912,8 +918,6 @@ bool Content::IsAssetTypeIdInvalid(const ScriptingTypeHandle& type, const Script
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<StringView, IAssetFactory*> IAssetFactory::Factories;
|
|
||||||
|
|
||||||
Asset* Content::LoadAsync(const Guid& id, const ScriptingTypeHandle& type)
|
Asset* Content::LoadAsync(const Guid& id, const ScriptingTypeHandle& type)
|
||||||
{
|
{
|
||||||
if (!id.IsValid())
|
if (!id.IsValid())
|
||||||
|
|||||||
@@ -16,15 +16,11 @@ class FLAXENGINE_API IAssetFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Dictionary<StringView, IAssetFactory*> Collection;
|
typedef Dictionary<StringView, IAssetFactory*> Collection;
|
||||||
static Collection Factories;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the all registered assets factories. Key is asset typename, value is the factory object.
|
/// Gets the all registered assets factories. Key is asset typename, value is the factory object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static Collection& Get()
|
static Collection& Get();
|
||||||
{
|
|
||||||
return Factories;
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user