bDisableMotionData
bDisableMotionData
#Overview
name: bDisableMotionData
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bDisableMotionData is to control whether motion data from the device is used in iOS applications built with Unreal Engine. This setting is primarily related to the input system and device-specific features for iOS platforms.
This setting variable is utilized by the iOS-specific input interface and runtime settings modules of Unreal Engine. Specifically, it’s referenced in the IOS input interface (IOSInputInterface.cpp) and defined in the iOS runtime settings (IOSRuntimeSettings.h and IOSRuntimeSettings.cpp).
The value of this variable is set in the IOSRuntimeSettings class constructor (IOSRuntimeSettings.cpp) with a default value of false. It can be modified through the project settings in the Unreal Engine editor or by changing the configuration files.
This variable interacts with other iOS-specific settings, such as bGameSupportsMultipleActiveControllers, bAllowRemoteRotation, and bAllowControllers. It’s part of a larger group of settings that configure iOS-specific behaviors.
Developers should be aware that disabling motion data can improve battery life on iOS devices if the application doesn’t require motion input. However, this will prevent the game from accessing device motion data, which might be crucial for certain gameplay mechanics or features.
Best practices when using this variable include:
- Only disable motion data if your game doesn’t rely on motion controls or device orientation changes.
- Consider the impact on user experience before disabling motion data, as some users might expect motion features in mobile games.
- If you disable motion data, ensure that all parts of your game that might have used motion input have alternative input methods available.
- Test your game thoroughly with this setting both enabled and disabled to ensure proper functionality in all scenarios.
- Document the use of this setting in your project, so other team members understand its implications.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:3029, section: [/Script/IOSRuntimeSettings.IOSRuntimeSettings]
- INI Section:
/Script/IOSRuntimeSettings.IOSRuntimeSettings
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSInputInterface.cpp:114
Scope (from outer to inner):
file
function FIOSInputInterface::FIOSInputInterface
Source code excerpt:
#endif
bPauseMotion = false;
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bDisableMotionData"), bPauseMotion, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bGameSupportsMultipleActiveControllers"), bGameSupportsMultipleActiveControllers, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bAllowRemoteRotation"), bAllowRemoteRotation, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bAllowControllers"), bAllowControllers, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bControllersBlockDeviceFeedback"), bControllersBlockDeviceFeedback, GEngineIni);
#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Classes/IOSRuntimeSettings.h:360
Scope (from outer to inner):
file
class class UIOSRuntimeSettings : public UObject
Source code excerpt:
// Disables usage of device motion data. If application does not use motion data disabling it will improve battery life
UPROPERTY(GlobalConfig, EditAnywhere, Category = Input, meta = (DisplayName = "Disable Motion Controls"))
bool bDisableMotionData;
// Supports default portrait orientation. Landscape will not be supported.
UPROPERTY(GlobalConfig, EditAnywhere, Category = DeviceOrientations)
uint32 bSupportsPortraitOrientation : 1;
// Supports upside down portrait orientation. Landscape will not be supported.
#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Private/IOSRuntimeSettings.cpp:54
Scope (from outer to inner):
file
function UIOSRuntimeSettings::UIOSRuntimeSettings
Source code excerpt:
bGameSupportsMultipleActiveControllers = false;
bAllowRemoteRotation = true;
bDisableMotionData = false;
bEnableRemoteNotificationsSupport = false;
bEnableBackgroundFetch = false;
bSupportsMetal = true;
bSupportsMetalMRT = false;
bSupportHighRefreshRates = false;
bDisableHTTPS = false;