You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Preferred alternative fix (instead of CL16332153) for UE-115783 and UE-115714 that uses inlining instead of relying on the caller to selectively enable/disable linking in their build files. This leaves the TextureFormat module with zero exports. Only interfaces and two inline functions. Confirmed compile & link on: win64 editor, win64 server shipping, linux server shipping, ShooterGame linux editor
#rb #preflight 609eecbbf6c6e3000143e139 [CL 16337324 by Zousar Shaker in ue5-main branch]
This commit is contained in:
@@ -6,7 +6,20 @@
|
||||
#include "Interfaces/ITextureFormatManagerModule.h"
|
||||
|
||||
/** Return the Texture Format Manager interface, if it is available, otherwise return nullptr. **/
|
||||
TEXTUREFORMAT_API class ITextureFormatManagerModule* GetTextureFormatManager();
|
||||
inline ITextureFormatManagerModule* GetTextureFormatManager()
|
||||
{
|
||||
return FModuleManager::LoadModulePtr<ITextureFormatManagerModule>("TextureFormat");
|
||||
}
|
||||
|
||||
/** Return the Texture Format Manager interface, fatal error if it is not available. **/
|
||||
TEXTUREFORMAT_API class ITextureFormatManagerModule& GetTextureFormatManagerRef();
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user