MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetApplicationImage

Method GetApplicationImage

Source/Editor/Utilities/EditorUtilities.cpp:68–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68bool EditorUtilities::GetApplicationImage(const Guid& imageId, TextureData& imageData, ApplicationImageType type)
69{
70 AssetReference<Texture> icon = Content::LoadAsync<Texture>(imageId);
71 if (icon == nullptr)
72 {
73 const auto gameSettings = GameSettings::Get();
74 if (gameSettings)
75 {
76 icon = Content::LoadAsync<Texture>(gameSettings->Icon);
77 }
78 }
79 if (icon == nullptr)
80 {
81 if (type == ApplicationImageType::Icon)
82 {
83 icon = Content::LoadAsyncInternal<Texture>(TEXT("Engine/Textures/FlaxIconBlue"));
84 }
85 else if (type == ApplicationImageType::SplashScreen)
86 {
87 icon = Content::LoadAsyncInternal<Texture>(TEXT("Engine/Textures/SplashScreenLogo"));
88 }
89 }
90 if (icon)
91 {
92 return GetTexture(icon.GetID(), imageData);
93 }
94 return true;
95}
96
97bool EditorUtilities::GetTexture(const Guid& textureId, TextureData& textureData)
98{

Callers

nothing calls this directly

Calls 3

GetTextureFunction · 0.85
GetIDMethod · 0.80
GetFunction · 0.50

Tested by

no test coverage detected