| 66 | } |
| 67 | |
| 68 | bool 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 | |
| 97 | bool EditorUtilities::GetTexture(const Guid& textureId, TextureData& textureData) |
| 98 | { |
nothing calls this directly
no test coverage detected