You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Removed unnecessary singleton initialization in FRuntimeAssetCacheModule::GetRuntimeAssetCache (failed due to critical section not longer being copyable) - Added default constructor definition for FHTML5CriticalSection (private copy constructor was added so default constructor would no longer get auto-geterated) #codereview Steve.Robb, Bob.Tellez #lockdown Nick.Penwarden [CL 2788689 by Robert Manuszewski in Main branch]
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "RuntimeAssetCachePrivatePCH.h"
|
|
#include "RuntimeAssetCacheModule.h"
|
|
#include "RuntimeAssetCache.h"
|
|
#include "ModuleManager.h"
|
|
#include "EngineMinimal.h"
|
|
#include "Engine/World.h"
|
|
|
|
DEFINE_LOG_CATEGORY(RuntimeAssetCache)
|
|
|
|
FRuntimeAssetCacheInterface& GetRuntimeAssetCache()
|
|
{
|
|
static FRuntimeAssetCacheModuleInterface& Module = FModuleManager::LoadModuleChecked<FRuntimeAssetCacheModuleInterface>("RuntimeAssetCache");
|
|
static FRuntimeAssetCacheInterface& Interface = Module.GetRuntimeAssetCache();
|
|
return Interface;
|
|
}
|
|
|
|
/**
|
|
* Class implementing RuntimeAssetCache module interface. This is split
|
|
* to solve circular dependency when building UHT.
|
|
*/
|
|
class FRuntimeAssetCacheModule : public FRuntimeAssetCacheModuleInterface
|
|
{
|
|
public:
|
|
/**
|
|
* Gets runtime asset cache.
|
|
* @return Runtime asset cache.
|
|
*/
|
|
virtual FRuntimeAssetCacheInterface& GetRuntimeAssetCache() override
|
|
{
|
|
static FRuntimeAssetCache RuntimeAssetCache;
|
|
return RuntimeAssetCache;
|
|
}
|
|
|
|
void StartupModule() override
|
|
{
|
|
FWorldDelegates::OnWorldTickStart.AddStatic(&FRuntimeAssetCacheModule::TickRuntimeAssetCache);
|
|
}
|
|
|
|
static void TickRuntimeAssetCache(ELevelTick TickType, float DeltaSeconds)
|
|
{
|
|
static FRuntimeAssetCacheModuleInterface& Module = FModuleManager::LoadModuleChecked<FRuntimeAssetCacheModuleInterface>("RuntimeAssetCache");
|
|
static FRuntimeAssetCacheInterface& Interface = Module.GetRuntimeAssetCache();
|
|
Interface.Tick();
|
|
}
|
|
};
|
|
|
|
IMPLEMENT_MODULE(FRuntimeAssetCacheModule, RuntimeAssetCache);
|