#if UNITY_EDITOR || UNITY_IOS || UNITY_TVOS || PACKAGE_DOCS_GENERATION
using System;
using UnityEngine.InputSystem.iOS;
namespace UnityEngine.InputSystem.iOS
{
///
/// Governs access to a privacy-related resource on the user's device. Corresponds to a key in the application's
/// Information Property List (Info.plist).
///
///
[Serializable]
public class PrivacyDataUsage
{
///
/// Whether access to the respective resource will be requested.
///
///
/// Before accessing a resource or a sensor, you need to explicitly enable the usage for it, otherwise the access for the resource will be denied.
///
/// If this is set to true, the respective protected resource key will be entered in the application's Information Property List (Info.plist)
/// using .
///
public bool enabled
{
get => m_Enabled;
set => m_Enabled = value;
}
///
/// Provide meaningful usage description.
///
///
/// The description will be presented to the user in the dialog when you'll try to access a related resource or sensor.
///
public string usageDescription
{
get => m_Description;
set => m_Description = value;
}
[SerializeField] private bool m_Enabled;
[SerializeField] private string m_Description;
}
}
namespace UnityEngine.InputSystem
{
public partial class InputSettings
{
///
/// Project-wide input settings for the iOS/tvOS platform.
///
[Serializable]
public class iOSSettings
{
///
/// Setting for access to the device's motion sensors (such as ).
///
///
/// Alternatively, you can manually add Privacy - Motion Usage Description to the Info.plist file.
///
///
///
public PrivacyDataUsage motionUsage
{
get => m_MotionUsage;
set => m_MotionUsage = value;
}
[SerializeField] private PrivacyDataUsage m_MotionUsage = new PrivacyDataUsage();
}
///
/// iOS/tvOS-specific settings.
///
///
/// This is only accessible in the editor or in iOS/tvOS players.
///
public iOSSettings iOS => m_iOSSettings;
[SerializeField]
private iOSSettings m_iOSSettings = new iOSSettings();
}
}
#endif