A game about forced loneliness, made by TACStudios
1#if UNITY_EDITOR
2using System;
3using UnityEditor;
4
5namespace UnityEngine.InputSystem
6{
7 internal class InputSettingsiOSProvider
8 {
9 [NonSerialized] private SerializedProperty m_MotionUsageEnabled;
10 [NonSerialized] private SerializedProperty m_MotionUsageDescription;
11
12 private GUIContent m_MotionUsageContent;
13 private GUIContent m_MotionUsageDescriptionContent;
14
15 public InputSettingsiOSProvider(SerializedObject parent)
16 {
17 var prefix = "m_iOSSettings.m_MotionUsage";
18 m_MotionUsageEnabled = parent.FindProperty(prefix + ".m_Enabled");
19 m_MotionUsageDescription = parent.FindProperty(prefix + ".m_Description");
20
21 m_MotionUsageContent = new GUIContent("Motion Usage", "Enables Motion Usage for the app, required for sensors like Step Counter. This also adds 'Privacy - Motion Usage Description' entry to Info.plist");
22 m_MotionUsageDescriptionContent = new GUIContent(" Description", "Describe why the app wants to access the device's Motion Usage sensor.");
23 }
24
25 public void OnGUI()
26 {
27 EditorGUILayout.PropertyField(m_MotionUsageEnabled, m_MotionUsageContent);
28 EditorGUI.BeginDisabledGroup(!m_MotionUsageEnabled.boolValue);
29 EditorGUILayout.PropertyField(m_MotionUsageDescription, m_MotionUsageDescriptionContent);
30 EditorGUI.EndDisabledGroup();
31 }
32 }
33}
34
35#endif