PlayerNotifications.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. namespace UnityEngine.InputSystem
  2. {
  3. /// <summary>
  4. /// Determines how the triggering of an action or other input-related events are relayed to other GameObjects.
  5. /// </summary>
  6. public enum PlayerNotifications
  7. {
  8. ////TODO: add a "None" behavior; for actions, users may want to poll (or use the generated interfaces)
  9. /// <summary>
  10. /// Use <see cref="GameObject.SendMessage(string,object)"/> to send a message to the <see cref="GameObject"/>
  11. /// that <see cref="PlayerInput"/> belongs to.
  12. /// </summary>
  13. /// <remarks>
  14. /// The message name will be the name of the action (e.g. "Jump"; it will not include the action map name),
  15. /// and the object will be the <see cref="PlayerInput"/> on which the action was triggered.
  16. ///
  17. /// If the notification is for an action that was triggered, <see cref="SendMessageOptions"/> will be
  18. /// <see cref="SendMessageOptions.RequireReceiver"/> (i.e. an error will be logged if there is no corresponding
  19. /// method). Otherwise it will be <see cref="SendMessageOptions.DontRequireReceiver"/>.
  20. /// </remarks>
  21. SendMessages,
  22. /// <summary>
  23. /// Like <see cref="SendMessages"/> but instead of using <see cref="GameObject.SendMessage(string,object)"/>,
  24. /// use <see cref="GameObject.BroadcastMessage(string,object)"/>.
  25. /// </summary>
  26. BroadcastMessages,
  27. InvokeUnityEvents,
  28. InvokeCSharpEvents,
  29. }
  30. }