Files
UnrealEngineUWP/Engine/Source/Developer/TextureFormat/Public/TextureFormatManager.h
zousar shaker 1ab95a72ae Fix non-unity compile issue in TextureFormatManager
#rb none

#ROBOMERGE-SOURCE: CL 16354268 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16354278 by zousar shaker in ue5-release-engine-test branch]
2021-05-17 12:32:02 -04:00

27 lines
945 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreTypes.h"
#include "Interfaces/ITextureFormatManagerModule.h"
#include "Modules/ModuleManager.h"
/** Return the Texture Format Manager interface, if it is available, otherwise return nullptr. **/
inline ITextureFormatManagerModule* GetTextureFormatManager()
{
return FModuleManager::LoadModulePtr<ITextureFormatManagerModule>("TextureFormat");
}
/** Return the Texture Format Manager interface, fatal error if it is not available. **/
inline ITextureFormatManagerModule& GetTextureFormatManagerRef()
{
class ITextureFormatManagerModule* TextureFormatManager = GetTextureFormatManager();
if (!TextureFormatManager)
{
UE_LOG(LogInit, Fatal, TEXT("Texture format manager was requested, but not available."));
CA_ASSUME( TextureFormatManager != NULL ); // Suppress static analysis warning in unreachable code (fatal error)
}
return *TextureFormatManager;
}