Immerseum.VRSimulator Namespace > EventManager Class : OnInputActionEnd Event |
Fired when an InputAction's processing has completed, at the conclusion of the primary listener that handles OnInputActionStart.
Best Practice | |
If you have many separate listeners all listening for a particular OnInputActionStart, it may be easy to lose track of which listener should invoke EventManager.endInputAction. As a general rule of thumb, this event should be invoked by the "main" method that deals with the InputAction. "Main" in your case may be the method that does the most, or the method takes the longest, or the method that deals directly with the user's avatar. |
public event EventManager.InputEndAction OnInputActionEnd
public class myClass : MonoBehaviour { void OnEnable() { EventManager.OnInputActionEnd += myCustomListener; } void OnDisable() { EventManager.OnInputActionEnd -= myCustomListener; } void myCustomListener(InputAction action) { // Custom listener logic goes here. } }