Behavior Events
Pro Behavior
A behavior is triggered by a source event. The event determines what context values are available to expressions and actions.
Supported Events
Section titled “Supported Events”| Event | Typical use |
|---|---|
| OnTagAdded | Validate or react when a tag is added. |
| OnTagRemoved | Clean up or report after a tag is removed. |
| OnTagReplaced | Validate migrations and redirect resolution. |
| OnActorAddedToLevel | Check newly placed Actors. |
| OnActorRenamed | Validate naming conventions or tag-dependent rules. |
| OnActorClassChanged | Validate class and tag combinations. |
| OnComponentAddedToActor | Auto-tag or validate added components. |
| OnComponentRemovedFromActor | Report follow-up problems. |
| OnComponentRenamed | Validate component naming conventions. |
| OnAssetOpened | Check Asset Tags or metadata when an asset is opened. |
| OnAssetSaved | Validate asset tags before save. |
| OnManualTrigger | Run a behavior manually from editor tooling. |
Event Context
Section titled “Event Context”Depending on the event, these values can be available:
- Actor
- Component
- Source Object
- Tag Name
- Previous Tag Name
- Asset Object
- flags such as auto tag or assign operation
The helper functions in UJ2TagBehaviorBlueprintLibrary expose common event context reads such as GetEventActor, GetEventComponent, GetEventTagName, and GetEventSourceObject.
Manual Execution
Section titled “Manual Execution”OnManualTrigger is useful for checks that should not run on every editor change. Manual behaviors can be launched from the Behavior Editor or from supported tag context actions.
Recommended Practice
Section titled “Recommended Practice”Choose the narrowest event that matches the rule. A behavior that only needs to react to tag assignment should not run from broader Actor lifecycle events.