Event Names
Here is a list of all EventHandler events that the controller uses, along with a brief description of what each event is used for and its parameters, if it has any:
Event Name | Parameters | Description |
OnAbilityActive | Ability ability, bool active | The ability has started or stopped |
OnAbilityMessageCanStart | Ability ability, bool canStart | The ability can start or no longer stop. |
OnAbilityUnequipItemComplete | CharacterItem item, int slotID | The item has been unequipped from the slot slotID . |
OnAbilityWillEquipItem | CharacterItem item, int slotID | The item will be equipped in the slot slotID . |
OnAddCrosshairsSpread | bool start, bool fromRecoil | The crosshair spread should be started/stopped, either from recoil or set to max spread. |
OnAddSecondaryCameraForce | Vector3 positionalForce, Vector3 rotationalForce, float restAccumulation | Adds a secondary positional and rotational force to the ViewTypes. |
OnAddSecondaryForce | int slotID, Vector3 positionalForce, Vector3 rotationalForce, bool globalForce | Adds a positional and rotational force to the IK target. |
OnAimAbilityAim | bool aim | The aim ability is/is not aiming. |
OnAimAbilityStart | bool aim, bool inputStart | The aim ability was started/stopped. inputStart describes whether it was started/stopped from user input. |
OnAnimatorSnapped | The animator has been snapped. | |
OnAnimatorWillSnap | The animator will snap. | |
OnAnchorOffsetUpdated | The camera’s anchor offset value has been changed. | |
OnAttributeModifierAutoUpdateEnabled | AttributeModifier attributeModifier, bool enable | The attributeModifier ‘s auto-update has been enabled/disabled. |
OnAttributeReachedDestinationValue | An attribute has reached its destination value. | |
OnAttributeUpdateValue | Attribute attribute | The attribute ‘s value has been changed. |
OnCameraAttachCharacter | GameObject character | The character has been attached to the camera. |
OnCameraChangePerspectives | bool firstPersonPerspective | The camera has swithced between first and third person perspectives. |
OnCameraChangeViewTypes | ViewType viewType, bool activate | The viewType was activated/deactivated. |
OnCameraRotationalForce | Vector3 force | Add the rotational force to the camera. |
OnCameraWillChangePerspectives | bool firstPersonPerspective | The camera will switch between first and third person perspectives. |
OnCameraZoom | bool zoom | The camera has zoomed in/out. |
OnCharacterAbilityActive | Ability ability, bool active | The ability has been activated/deactivated. |
OnCharacterActivate | bool active | The character itself has been activated/deactivated. |
OnCharacterAttachCamera | CameraController cameraController | The cameraController has been attached to the character. |
OnCharacterAttachLookSource | ILookSource lookSource | The ILookSource has been attached to the character. |
OnCharacterChangeMovementType | MovementType movementType | The character’s movement type will be changed to movementType . |
OnCharacterChangeMovingPlatforms | Transform platform | The character has been attached to the moving platform . |
OnCharacterChangePerspectives | bool firstPersonPerspective | The camera will switch between first and third person perspectives. |
OnCharacterChangeTimeScale | bool value | The character’s time scale will be changed to value . |
OnCharacterChangeUpdateLocation | UpdateLocation updateLocation | The character’s update location will be changed to the specified updateLocation . |
OnCharacterDestroyed | The Ultimate Character Locomotion component has been destroyed. | |
OnCharacterEnterUIZone | bool inUIZone | The character has entered/exited a zone which should show the UI and cursor. |
OnCharacterForceIndependentLook | bool independentLook | Independent look will be enabled/disabled on the character to allow the ability to have control over rotation. |
OnCharacterGrounded | bool grounded | The character’s grounded state has changed to grounded . |
OnCharacterImmediateTransformChange | bool snapAnimator | The character’s transform position/rotation has been immediately changed. |
OnCharacterIndependentFade | bool enable, bool revertFade | Another object has started or stopped taking control of the character fade. |
OnCharacterItemAbilityActive | ItemAbility itemAbility, bool active | The itemAbility has been activated/deactivated. |
OnCharacterLand | float height | The character has landed from height . |
OnCharacterLean | float distance, float tilt, float itemTiltMultiplier | The character is leaning the specified distance and tilt amount. |
OnCharacterMoving | bool moving | The character has either started or stopped moving. |
OnCharacterSnapAnimator | The character’s animator should be snapped to match its current state. | |
OnDeath | Vector3 position, Vector3 force, GameObject attacker | An object with the Health component has died. See OnHealthDamage . |
OnEnableGameplayInput | bool enable | Gameplay input should be enabled/disabled. |
OnEquipUnequipItemSetIndexChange | int itemSetIndex | The active ItemSet index has changed to itemSetIndex . |
OnEquipUnequipVerifyUnequipItem | int itemSetCategoryIndex, int slotID | Verify that the unequipping item specified by the itemSetCategoryIndex in the slot slotID still needs to be unequipped. |
OnFirstPersonPerspectiveActivate | FirstPersonPerspectiveItem perspectiveItem, bool active | The first person perspective item has been activated/deactivated. |
OnHealthDamage | float amount, Vector3 position, Vector3 force, GameObject attacker, Collider hitCollider | Damage has been applied to the Health component. |
OnHealthHeal | float amount | The Health component has been healed by amount . |
OnHeightChangeAdjustHeight | float heightAdjustment | The character’s height has been adjusted by the specified amount. |
OnInputControllerConnected | bool controllerConnected | A controller has been connected/disconnected. |
OnInventoryAddItem | CharacterItem item | The item has been added to the inventory. |
OnInventoryAdjustItemIdentifierAmount | IItemIdentifier itemIdentifier, int remaining | The amount of the item itemIdentifier has been adjusted, leaving remaining of that item left. |
OnInventoryEquipItem | CharacterItem item, int slotID | The item in slot slotID has been equipped. |
OnInventoryPickupItem | CharacterItem item, int amount, bool immediatePickup, bool forceEquip | The amount of item has been picked up and will/will not be picked up immediately and forcefully equipped. |
OnInventoryPickupItemIdentifier | IItemIdentifier itemIdentifier, int amount, bool immediatePickup, bool forceEquip | The amount of item itemIdentifier has been picked up and will/will not be picked up immediately and forcefully equipped. |
OnInventoryRemoveItem | ||
OnInventoryRespawned | The inventory has respawned. | |
OnInventoryUnequipItem | CharacterItem item, int slotID | The item in slot slotID has been unequipped. |
OnItemPickupStartPickup | An ItemPickup has been started to be picked up. | |
OnItemPickupStopPickup | An ItemPickup has been stopped to be picked up. | |
OnItemSetIndexChange | int categoryIndex, int itemSetIndex | The ItemSetManager has changed the category categoryIndex ‘s active ItemSet index to itemSetIndex . |
OnItemSetManagerUpdateItemSet | int categoryIndex, int itemSetIndex | Updates the currently active item set in the category categoryIndex to itemSetIndex . |
OnItemSetManagerUpdateNextItemSet | int categoryIndex, int prevItemSetIndex, int itemSetIndex | Updates the next item set in category categoryIndex , including the previous and next item set indices. |
OnItemShowFullScreenUI | int fullScreenUIID, bool showFullScreenUI | Shows/hides the full screen UI object based on its UI ID. |
OnItemStartUse | IUsableItem item, bool use | The item is starting/stopping use. |
OnItemTryReload | int slotID, IItemIdentifier itemIdentifier, bool immediateReload, bool equipCheck | The item at slot slotID is trying to reload using itemIdentifier . |
OnItemUpdateDominantItem | CharacterItem item, bool dominantItem | Sets the item as the dominant/not dominant item. |
OnMagicItemCast | CharacterItem item | The magic item has cast an action. |
OnMagicItemImpact | CharacterItem item, SurfaceImpact surfaceImpact | The magic item has collided with a surface. |
OnMagicItemStartStopBeginEndActions | CharacterItem item, bool beginActions, bool start | A magic item ‘s begin/end actions have been started/stopped. |
OnNextItemSet | CharacterItem item, bool unequipOnFailure | The item wants to change to equip the next item from the item set. |
OnObjectImpact |
ImpactCallbackContext ctx | An object has been impacted by another object. |
OnObjectPickedUp | ObjectPickup objectPickup | The objectPickup has been picked up. |
OnRespawn | The object has respawned. | |
OnShieldImpact | Shield shield, object source | The shield has been impacted by object . |
OnShootableWeaponShowProjectile | GameObject projectile, bool show | The ShootableWeapon ItemAction has shown or hidden a projectile . |
OnShowUI | bool show | The UI should be shown/hidden. |
OnStateChange | GameObject gameObject, string stateName, bool active | The gameObject has activated/deactivated the stateName state. |
OnStoredInputAbilityResetStoredInputs | Resets the ability’s stored user inputs. | |
OnTryRecenterTracking | VR only – The camera’s rotation has changed, so tracking recentering should occur. | |
OnUseAbilityStart | bool start, Use useAbility | The specified useAbility has been started/stopped. |
OnUseAbilityUsedItem | IUsableItem item | The Use ability has used item . |
OnWillRespawn | The object will respawn. |