A game about forced loneliness, made by TACStudios
1#if UNITY_EDITOR 2 3using System; 4 5namespace UnityEngine.InputSystem.Editor 6{ 7 internal static class InputEditorAnalytics 8 { 9 /// <summary> 10 /// Represents notification behavior setting associated with <see cref="PlayerInput"/> and 11 /// <see cref="PlayerInputManager"/>. 12 /// </summary> 13 internal enum PlayerNotificationBehavior 14 { 15 SendMessages = 0, 16 BroadcastMessages = 1, 17 UnityEvents = 2, 18 CSharpEvents = 3 19 } 20 21 /// <summary> 22 /// Converts from current <see cref="PlayerNotifications"/> type to analytics counterpart. 23 /// </summary> 24 /// <param name="value">The value to be converted.</param> 25 /// <returns></returns> 26 /// <exception cref="ArgumentOutOfRangeException">If there is no available remapping.</exception> 27 internal static PlayerNotificationBehavior ToNotificationBehavior(PlayerNotifications value) 28 { 29 switch (value) 30 { 31 case PlayerNotifications.SendMessages: 32 return PlayerNotificationBehavior.SendMessages; 33 case PlayerNotifications.BroadcastMessages: 34 return PlayerNotificationBehavior.BroadcastMessages; 35 case PlayerNotifications.InvokeUnityEvents: 36 return PlayerNotificationBehavior.UnityEvents; 37 case PlayerNotifications.InvokeCSharpEvents: 38 return PlayerNotificationBehavior.CSharpEvents; 39 default: 40 throw new ArgumentOutOfRangeException(nameof(value)); 41 } 42 } 43 } 44} 45 46#endif