unreal.AISense_Blueprint

class unreal.AISense_Blueprint(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: AISense

AISense Blueprint

C++ Source:

  • Module: AIModule

  • File: AISense_Blueprint.h

Editor Properties: (see get_editor_property/set_editor_property)

  • auto_register_all_pawns_as_sources (bool): [Read-Write] Auto Register All Pawns as Sources: If true all newly spawned pawns will get auto registered as source for this sense.

  • default_expiration_age (float): [Read-Only] Default Expiration Age: age past which stimulus of this sense are “forgotten”. (DEPRECATED: This property will be removed in future versions. Use AISenseConfig::MaxAge instead.)

  • listener_container (Array[AIPerceptionComponent]): [Read-Write] Listener Container

  • listener_data_type (type(Class)): [Read-Write] Listener Data Type

  • notify_type (AISenseNotifyType): [Read-Write] Notify Type

  • wants_new_pawn_notification (bool): [Read-Write] Wants New Pawn Notification: whether this sense is interested in getting notified about new Pawns being spawned

    this can be used for example for automated sense sources registration

get_all_listener_actors() Array[Actor]

Get All Listener Actors

Returns:

listener_actors (Array[Actor]):

Return type:

Array[Actor]

get_all_listener_components() Array[AIPerceptionComponent]

Get All Listener Components

Returns:

listener_components (Array[AIPerceptionComponent]):

Return type:

Array[AIPerceptionComponent]

property listener_container: Array[AIPerceptionComponent]

[Read-Only] Listener Container

Type:

(Array[AIPerceptionComponent])

property listener_data_type: Class

[Read-Write] Listener Data Type

Type:

(type(Class))

on_listener_registered(actor_listener, perception_component) None
Parameters:
on_listener_unregistered(actor_listener, perception_component) None

called when a listener unregistered from this sense. Most often this is called due to actor’s death

Parameters:
on_listener_updated(actor_listener, perception_component) None
Parameters:
on_new_pawn(new_pawn) None

called when sense’s instance gets notified about new pawn that has just been spawned

Parameters:

new_pawn (Pawn) –

on_update(events_to_process) float
returns requested amount of time to pass until next frame.

Return 0 to get update every frame (WARNING: hits performance)

Parameters:

events_to_process (Array[AISenseEvent]) –

Return type:

float