Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

InputSettingsiOSProvider.cs 1.4KB

1234567891011121314151617181920212223242526272829303132333435
  1. #if UNITY_EDITOR
  2. using System;
  3. using UnityEditor;
  4. namespace UnityEngine.InputSystem
  5. {
  6. internal class InputSettingsiOSProvider
  7. {
  8. [NonSerialized] private SerializedProperty m_MotionUsageEnabled;
  9. [NonSerialized] private SerializedProperty m_MotionUsageDescription;
  10. private GUIContent m_MotionUsageContent;
  11. private GUIContent m_MotionUsageDescriptionContent;
  12. public InputSettingsiOSProvider(SerializedObject parent)
  13. {
  14. var prefix = "m_iOSSettings.m_MotionUsage";
  15. m_MotionUsageEnabled = parent.FindProperty(prefix + ".m_Enabled");
  16. m_MotionUsageDescription = parent.FindProperty(prefix + ".m_Description");
  17. 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");
  18. m_MotionUsageDescriptionContent = new GUIContent(" Description", "Describe why the app wants to access the device's Motion Usage sensor.");
  19. }
  20. public void OnGUI()
  21. {
  22. EditorGUILayout.PropertyField(m_MotionUsageEnabled, m_MotionUsageContent);
  23. EditorGUI.BeginDisabledGroup(!m_MotionUsageEnabled.boolValue);
  24. EditorGUILayout.PropertyField(m_MotionUsageDescription, m_MotionUsageDescriptionContent);
  25. EditorGUI.EndDisabledGroup();
  26. }
  27. }
  28. }
  29. #endif