// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. #pragma once #if PLATFORM_ANDROID || USE_EDITOR #include "Engine/Core/Config/PlatformSettingsBase.h" #include "Engine/Scripting/SoftObjectReference.h" class Texture; /// /// Android platform settings. /// API_CLASS(sealed, Namespace="FlaxEditor.Content.Settings") class FLAXENGINE_API AndroidPlatformSettings : public SettingsBase { DECLARE_SCRIPTING_TYPE_MINIMAL(AndroidPlatformSettings); API_AUTO_SERIALIZATION(); /// /// Android screen orientation options. /// API_ENUM() enum class FLAXENGINE_API ScreenOrientation { /// /// "portrait" mode /// Portrait, /// /// "reversePortrait" mode /// PortraitReverse, /// /// "landscape" mode /// LandscapeRight, /// /// "reverseLandscape" mode /// LandscapeLeft, /// /// "fullSensor" mode /// AutoRotation, }; /// /// The output textures quality (compression). /// API_ENUM() enum class TextureQuality { // Raw image data without any compression algorithm. Mostly for testing or compatibility. Uncompressed, // ASTC 4x4 block compression. API_ENUM(Attributes="EditorDisplay(null, \"ASTC High\")") ASTC_High, // ASTC 6x6 block compression. API_ENUM(Attributes="EditorDisplay(null, \"ASTC Medium\")") ASTC_Medium, // ASTC 8x8 block compression. API_ENUM(Attributes="EditorDisplay(null, \"ASTC Low\")") ASTC_Low, }; /// /// The application package name (eg. com.company.product). Custom tokens: ${PROJECT_NAME}, ${COMPANY_NAME}. /// API_FIELD(Attributes="EditorOrder(0), EditorDisplay(\"General\")") String PackageName = TEXT("com.${COMPANY_NAME}.${PROJECT_NAME}"); /// /// The application permissions list (eg. android.media.action.IMAGE_CAPTURE). Added to the generated manifest file. /// API_FIELD(Attributes="EditorOrder(100), EditorDisplay(\"General\")") Array Permissions; /// /// The default screen orientation. /// API_FIELD(Attributes = "EditorOrder(110), EditorDisplay(\"General\")") ScreenOrientation DefaultOrientation = ScreenOrientation::AutoRotation; /// /// The output textures quality (compression). /// API_FIELD(Attributes="EditorOrder(500), EditorDisplay(\"General\")") TextureQuality TexturesQuality = TextureQuality::ASTC_Medium; /// /// Custom icon texture to use for the application (overrides the default one). /// API_FIELD(Attributes="EditorOrder(1030), EditorDisplay(\"Other\")") SoftObjectReference OverrideIcon; /// /// Gets the instance of the settings asset (default value if missing). Object returned by this method is always loaded with valid data to use. /// static AndroidPlatformSettings* Get(); }; #if PLATFORM_ANDROID typedef AndroidPlatformSettings PlatformSettings; #endif #endif