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 has started or stoppedability
OnAbilityMessageCanStart Ability ability, bool canStart The can start or no longer stop.ability
OnAbilityUnequipItemComplete CharacterItem item, int slotID The has been unequipped from the slot .itemslotID
OnAbilityWillEquipItem CharacterItem item, int slotID The will be equipped in the slot .itemslotID
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. describes whether it was started/stopped from user input.inputStart
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 ‘s auto-update has been enabled/disabled.attributeModifier
OnAttributeReachedDestinationValue An attribute has reached its destination value.
OnAttributeUpdateValue Attribute attribute The ‘s value has been changed.attribute
OnCameraAttachCharacter GameObject character The has been attached to the camera.character
OnCameraChangePerspectives bool firstPersonPerspective The camera has swithced between first and third person perspectives.
OnCameraChangeViewTypes ViewType viewType, bool activate The was activated/deactivated.viewType
OnCameraRotationalForce Vector3 force Add the rotational to the camera.force
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 has been activated/deactivated.ability
OnCharacterActivate bool active The character itself has been activated/deactivated.
OnCharacterAttachCamera CameraController cameraController The has been attached to the character.cameraController
OnCharacterAttachLookSource ILookSource lookSource The has been attached to the character.ILookSource
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 has been activated/deactivated.itemAbility
OnCharacterLand float height The character has landed from .height
OnCharacterLean float distance, float tilt, float itemTiltMultiplier The character is leaning the specified and amount.distancetilt
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 in the slot still needs to be unequipped.itemSetCategoryIndexslotID
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 has been added to the inventory.item
OnInventoryAdjustItemIdentifierAmount IItemIdentifier itemIdentifier, int remaining The amount of the item has been adjusted, leaving of that item left.itemIdentifierremaining
OnInventoryEquipItem CharacterItem item, int slotID The in slot has been equipped.itemslotID
OnInventoryPickupItem CharacterItem item, int amount, bool immediatePickup, bool forceEquip The of has been picked up and will/will not be picked up immediately and forcefully equipped.amountitem
OnInventoryPickupItemIdentifier IItemIdentifier itemIdentifier, int amount, bool immediatePickup, bool forceEquip The of item has been picked up and will/will not be picked up immediately and forcefully equipped.amountitemIdentifier
OnInventoryRemoveItem
OnInventoryRespawned The inventory has respawned.
OnInventoryUnequipItem CharacterItem item, int slotID The in slot has been unequipped.itemslotID
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 ‘s active ItemSet index to .categoryIndexitemSetIndex
OnItemSetManagerUpdateItemSet int categoryIndex, int itemSetIndex Updates the currently active item set in the category to .categoryIndexitemSetIndex
OnItemSetManagerUpdateNextItemSet int categoryIndex, int prevItemSetIndex, int itemSetIndex Updates the next item set in category , including the previous and next item set indices.categoryIndex
OnItemShowFullScreenUI int fullScreenUIID, bool showFullScreenUI Shows/hides the full screen UI object based on its UI ID.
OnItemStartUse IUsableItem item, bool use The is starting/stopping use.item
OnItemTryReload int slotID, IItemIdentifier itemIdentifier, bool immediateReload, bool equipCheck The item at slot is trying to reload using .slotIDitemIdentifier
OnItemUpdateDominantItem CharacterItem item, bool dominantItem Sets the as the dominant/not dominant item.item
OnMagicItemCast CharacterItem item The magic has cast an action.item
OnMagicItemImpact CharacterItem item, SurfaceImpact surfaceImpact The magic has collided with a surface.item
OnMagicItemStartStopBeginEndActions CharacterItem item, bool beginActions, bool start A magic ‘s begin/end actions have been started/stopped.item
OnNextItemSet CharacterItem item, bool unequipOnFailure The wants to change to equip the next item from the item set.item
OnObjectImpact
ImpactCallbackContext ctx
An object has been impacted by another object.
OnObjectPickedUp ObjectPickup objectPickup The has been picked up.objectPickup
OnRespawn The object has respawned.
OnShieldImpact Shield shield, object source The has been impacted by .shieldobject
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 has activated/deactivated the state.gameObjectstateName
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 has been started/stopped.useAbility
OnUseAbilityUsedItem IUsableItem item The Use ability has used .item
OnWillRespawn The object will respawn.把这些和上面的结合起来看,如果我要监控某一个Ability的启动怎么处理