unreal.SmartObjectLibrary

class unreal.SmartObjectLibrary(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Smart Object Blueprint Function Library

C++ Source:

  • Plugin: SmartObjects

  • Module: SmartObjectsModule

  • File: SmartObjectBlueprintFunctionLibrary.h

classmethod add_multiple_smart_objects(smart_object_actors) bool

Adds to the simulation all smart objects for multiple actors.

Parameters:

smart_object_actors (Array[Actor]) – The actors containing the smart objects to add to the simulation

Returns:

True if the requested operation succeeded; false otherwise

Return type:

bool

classmethod add_or_remove_multiple_smart_objects(smart_object_actors, add) bool

Adds to the simulation all smart objects for multiple actors or removes them according to ‘bAdd’. note: Removing a smart object from the simulation will interrupt all active interactions. If you simply need to make the object unavailable for queries consider using one of the SetSmartObjectEnabled functions so active interactions can be gracefully completed. See: SetSmartObjectEnabled, SetMultipleSmartObjectsEnabled

Parameters:
  • smart_object_actors (Array[Actor]) – The actors containing the smart objects to add or remove from the simulation

  • add (bool) – Whether the smart objects should be added or removed from the simulation

Returns:

True if all actors were valid and the requested operation succeeded; false otherwise

Return type:

bool

classmethod add_or_remove_smart_object(smart_object, enabled) bool

Adds to the simulation all smart objects for an actor or removes them according to ‘bAdd’. note: Removing a smart object from the simulation will interrupt all active interactions. If you simply need to make the object unavailable for queries consider using one of the SetSmartObjectEnabled functions so active interactions can be gracefully completed. See: SetSmartObjectEnabled, SetMultipleSmartObjectsEnabled

Parameters:
  • smart_object (Actor) –

  • enabled (bool) –

Returns:

True if the requested operation succeeded; false otherwise

Return type:

bool

classmethod add_smart_object(smart_object_actor) bool

Adds to the simulation all smart objects for an actor.

Parameters:

smart_object_actor (Actor) – The actor containing the smart objects to add to the simulation

Returns:

True if the requested operation succeeded; false otherwise

Return type:

bool

classmethod get_blackboard_value_as_so_claim_handle(node_owner, key) SmartObjectClaimHandle

Get Blackboard Value as SOClaim Handle

Parameters:
Return type:

SmartObjectClaimHandle

classmethod get_value_as_so_claim_handle(blackboard_component, key_name) SmartObjectClaimHandle

Get Value as SOClaim Handle

Parameters:
Return type:

SmartObjectClaimHandle

classmethod is_valid_smart_object_claim_handle(handle) bool

Is Valid Smart Object Claim Handle

Parameters:

handle (SmartObjectClaimHandle) –

Return type:

bool

classmethod k2_set_smart_object_enabled(smart_object: Actor, enabled: bool) bool

deprecated: ‘k2_set_smart_object_enabled’ was renamed to ‘add_or_remove_smart_object’.

classmethod remove_multiple_smart_objects(smart_object_actors) bool

Removes from the simulation all smart objects for multiple actors. note: Removing a smart object from the simulation will interrupt all active interactions. If you simply need to make the object unavailable for queries consider using one of the SetSmartObjectEnabled functions so active interactions can be gracefully completed. See: SetSmartObjectEnabled, SetMultipleSmartObjectsEnabled

Parameters:

smart_object_actors (Array[Actor]) – The actors containing the smart objects to remove from the simulation

Returns:

True if the requested operation succeeded; false otherwise

Return type:

bool

classmethod remove_smart_object(smart_object_actor) bool

Removes from the simulation all smart objects for an actor. note: Removing a smart object from the simulation will interrupt all active interactions. If you simply need to make the object unavailable for queries consider using one of the SetSmartObjectEnabled functions so active interactions can be gracefully completed. See: SetSmartObjectEnabled, SetMultipleSmartObjectsEnabled

Parameters:

smart_object_actor (Actor) – The actor containing the smart objects to add or remove from the simulation

Returns:

True if the requested operation succeeded; false otherwise

Return type:

bool

classmethod set_blackboard_value_as_so_claim_handle(node_owner, key, value) None

Set Blackboard Value as SOClaim Handle

Parameters:
classmethod set_multiple_smart_objects_enabled(smart_object_actors, enabled) bool

Marks all smart objects for a list of actors as enabled or not according to ‘bEnabled’. A smart object marked as Enabled is available for queries. note: Disabling a smart object will not interrupt active interactions, it will simply mark the object unavailable for new queries and broadcast an event that can be handled by the interacting agent to complete earlier. If the object should not be consider usable anymore and the interactions aborted then consider using one of the Add/RemoveSmartObject functions. See: AddOrRemoveSmartObject, AddOrRemoveMultipleSmartObjects, AddSmartObject, AddMultipleSmartObjects, RemoveSmartObject, RemoveMultipleSmartObjects

Parameters:
  • smart_object_actors (Array[Actor]) – The actors containing the smart objects to enable/disable

  • enabled (bool) – Whether the smart objects should be in the simulation (added) or not (removed)

Returns:

True if all actors were valid and the requested operation succeeded; false otherwise

Return type:

bool

classmethod set_smart_object_enabled(smart_object_actor, enabled) bool

Marks all smart objects for an actor as enabled or not according to ‘bEnabled’. A smart object marked as Enabled is available for queries. note: Disabling a smart object will not interrupt active interactions, it will simply mark the object unavailable for new queries and broadcast an event that can be handled by the interacting agent to complete earlier. If the object should not be consider usable anymore and the interactions aborted then consider using one of the Add/RemoveSmartObject functions. See: AddOrRemoveSmartObject, AddOrRemoveMultipleSmartObjects, AddSmartObject, AddMultipleSmartObjects, RemoveSmartObject, RemoveMultipleSmartObjects

Parameters:
  • smart_object_actor (Actor) – The actor containing the smart objects to enable/disable

  • enabled (bool) – Whether the smart objects should be enabled or not

Returns:

True if the requested operation succeeded; false otherwise

Return type:

bool

classmethod set_value_as_so_claim_handle(blackboard_component, key_name, value) None

Set Value as SOClaim Handle

Parameters: