unreal.SystemLibrary

class unreal.SystemLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Kismet System Library

C++ Source:

  • Module: Engine

  • File: KismetSystemLibrary.h

classmethod add_float_history_sample(value, float_history)DebugFloatHistory

Add Float History Sample

Parameters
Returns

Return type

DebugFloatHistory

classmethod begin_transaction(context, description, primary_object)int32

Begin a new undo transaction. An undo transaction is defined as all actions which take place when the user selects “undo” a single time. note: If there is already an active transaction in progress, then this increments that transaction’s action counter instead of beginning a new transaction. note: You must call TransactObject before modifying each object that should be included in this undo transaction. note: Only available in the editor.

Parameters
  • context (str) – The context for the undo session. Typically the tool/editor that caused the undo operation.

  • description (Text) – The description for the undo session. This is the text that will appear in the “Edit” menu next to the Undo item.

  • primary_object (Object) – The primary object that the undo session operators on (can be null, and mostly is).

Returns

The number of active actions when BeginTransaction was called (values greater than 0 indicate that there was already an existing undo transaction in progress), or -1 on failure.

Return type

int32

classmethod box_overlap_actors(world_context_object, box_pos, box_extent, object_types, actor_class_filter, actors_to_ignore)Array(Actor) or None

Returns an array of actors that overlap the given axis-aligned box.

Parameters
Returns

true if there was an overlap that passed the filters, false otherwise.

out_actors (Array(Actor)): Returned array of actors. Unsorted.

Return type

Array(Actor) or None

classmethod box_overlap_actors_new(world_context_object, box_pos, box_extent, object_types, actor_class_filter, actors_to_ignore)

deprecated: ‘box_overlap_actors_new’ was renamed to ‘box_overlap_actors’.

classmethod box_overlap_components(world_context_object, box_pos, extent, object_types, component_class_filter, actors_to_ignore)Array(PrimitiveComponent) or None

Returns an array of components that overlap the given axis-aligned box.

Parameters
Returns

true if there was an overlap that passed the filters, false otherwise.

out_components (Array(PrimitiveComponent)):

Return type

Array(PrimitiveComponent) or None

classmethod box_overlap_components_new(world_context_object, box_pos, extent, object_types, component_class_filter, actors_to_ignore)

deprecated: ‘box_overlap_components_new’ was renamed to ‘box_overlap_components’.

classmethod box_trace_multi(world_context_object, start, end, half_size, orientation, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweeps a box along the given line and returns all hits encountered. This trace finds the objects that RESPONDS to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • half_size (Vector) – Distance from the center of box along each axis

  • orientation (Rotator) – Orientation of the box

  • trace_channel (TraceTypeQuery) –

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod box_trace_multi_by_profile(world_context_object, start, end, half_size, orientation, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweep a box against the world and return all initial overlaps using a specific profile, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • half_size (Vector) – Distance from the center of box along each axis

  • orientation (Rotator) – Orientation of the box

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod box_trace_multi_for_objects(world_context_object, start, end, half_size, orientation, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweeps a box along the given line and returns all hits encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • half_size (Vector) – Radius of the sphere to sweep

  • orientation (Rotator) –

  • object_types (Array(ObjectTypeQuery)) – Array of Object Types to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod box_trace_single(world_context_object, start, end, half_size, orientation, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweeps a box along the given line and returns the first blocking hit encountered. This trace finds the objects that RESPONDS to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • half_size (Vector) – Distance from the center of box along each axis

  • orientation (Rotator) – Orientation of the box

  • trace_channel (TraceTypeQuery) –

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod box_trace_single_by_profile(world_context_object, start, end, half_size, orientation, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweep a box against the world and return the first blocking hit using a specific profile

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • half_size (Vector) – Distance from the center of box along each axis

  • orientation (Rotator) – Orientation of the box

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod box_trace_single_for_objects(world_context_object, start, end, half_size, orientation, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweeps a box along the given line and returns the first hit encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • half_size (Vector) – Radius of the sphere to sweep

  • orientation (Rotator) –

  • object_types (Array(ObjectTypeQuery)) – Array of Object Types to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod can_launch_url(url)bool

Can Launch URL

Parameters

url (str) –

Returns

Return type

bool

classmethod cancel_transaction(index)None

Cancel the current transaction, and no longer capture actions to be placed in the undo buffer. note: Only available in the editor.

Parameters

index (int32) – The action counter to cancel transactions from (as returned by a call to BeginTransaction).

classmethod capsule_overlap_actors(world_context_object, capsule_pos, radius, half_height, object_types, actor_class_filter, actors_to_ignore)Array(Actor) or None

Returns an array of actors that overlap the given capsule.

Parameters
  • world_context_object (Object) –

  • capsule_pos (Vector) – Center of the capsule.

  • radius (float) – Radius of capsule hemispheres and radius of center cylinder portion.

  • half_height (float) – Half-height of the capsule (from center of capsule to tip of hemisphere.

  • object_types (Array(ObjectTypeQuery)) –

  • actor_class_filter (type(Class)) –

  • actors_to_ignore (Array(Actor)) – Ignore these actors in the list

Returns

true if there was an overlap that passed the filters, false otherwise.

out_actors (Array(Actor)): Returned array of actors. Unsorted.

Return type

Array(Actor) or None

classmethod capsule_overlap_actors_new(world_context_object, capsule_pos, radius, half_height, object_types, actor_class_filter, actors_to_ignore)

deprecated: ‘capsule_overlap_actors_new’ was renamed to ‘capsule_overlap_actors’.

classmethod capsule_overlap_components(world_context_object, capsule_pos, radius, half_height, object_types, component_class_filter, actors_to_ignore)Array(PrimitiveComponent) or None

Returns an array of components that overlap the given capsule.

Parameters
  • world_context_object (Object) –

  • capsule_pos (Vector) – Center of the capsule.

  • radius (float) – Radius of capsule hemispheres and radius of center cylinder portion.

  • half_height (float) – Half-height of the capsule (from center of capsule to tip of hemisphere.

  • object_types (Array(ObjectTypeQuery)) –

  • component_class_filter (type(Class)) –

  • actors_to_ignore (Array(Actor)) – Ignore these actors in the list

Returns

true if there was an overlap that passed the filters, false otherwise.

out_components (Array(PrimitiveComponent)):

Return type

Array(PrimitiveComponent) or None

classmethod capsule_overlap_components_new(world_context_object, capsule_pos, radius, half_height, object_types, component_class_filter, actors_to_ignore)

deprecated: ‘capsule_overlap_components_new’ was renamed to ‘capsule_overlap_components’.

classmethod capsule_trace_multi(world_context_object, start, end, radius, half_height, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweeps a capsule along the given line and returns all hits encountered up to and including the first blocking hit. This trace finds the objects that RESPOND to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the capsule to sweep

  • half_height (float) – Distance from center of capsule to tip of hemisphere endcap.

  • trace_channel (TraceTypeQuery) –

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod capsule_trace_multi_by_profile(world_context_object, start, end, radius, half_height, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweep a capsule against the world and return all initial overlaps using a specific profile, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the capsule to sweep

  • half_height (float) – Distance from center of capsule to tip of hemisphere endcap.

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod capsule_trace_multi_for_objects(world_context_object, start, end, radius, half_height, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweeps a capsule along the given line and returns all hits encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the capsule to sweep

  • half_height (float) – Distance from center of capsule to tip of hemisphere endcap.

  • object_types (Array(ObjectTypeQuery)) – Array of Object Types to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod capsule_trace_multi_new(world_context_object, start, end, radius, half_height, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)

deprecated: ‘capsule_trace_multi_new’ was renamed to ‘capsule_trace_multi’.

classmethod capsule_trace_single(world_context_object, start, end, radius, half_height, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweeps a capsule along the given line and returns the first blocking hit encountered. This trace finds the objects that RESPOND to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the capsule to sweep

  • half_height (float) – Distance from center of capsule to tip of hemisphere endcap.

  • trace_channel (TraceTypeQuery) –

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod capsule_trace_single_by_profile(world_context_object, start, end, radius, half_height, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweep a capsule against the world and return the first blocking hit using a specific profile

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the capsule to sweep

  • half_height (float) – Distance from center of capsule to tip of hemisphere endcap.

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod capsule_trace_single_for_objects(world_context_object, start, end, radius, half_height, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweeps a capsule along the given line and returns the first hit encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the capsule to sweep

  • half_height (float) – Distance from center of capsule to tip of hemisphere endcap.

  • object_types (Array(ObjectTypeQuery)) – Array of Object Types to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod capsule_trace_single_new(world_context_object, start, end, radius, half_height, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)

deprecated: ‘capsule_trace_single_new’ was renamed to ‘capsule_trace_single’.

classmethod clear_and_invalidate_timer_handle(world_context_object, handle)TimerHandle

Clears a set timer.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to clear.

Returns

handle (TimerHandle): The handle of the timer to clear.

Return type

TimerHandle

classmethod clear_timer(object, function_name)None

Clears a set timer.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

classmethod clear_timer_delegate(delegate)None

Clears a set timer. deprecated: Use Clear Timer by Handle

Parameters

delegate (TimerDynamicDelegate) –

classmethod clear_timer_handle(world_context_object, handle)None

Clears a set timer. deprecated: Use Clear and Invalidate Timer by Handle. Note: you no longer need to reset your handle yourself after switching to the new function.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to clear.

classmethod collect_garbage()None

Deletes all unreferenced objects, keeping only referenced objects (this command will be queued and happen at the end of the frame) Note: This can be a slow operation, and should only be performed where a hitch would be acceptable

classmethod component_overlap_actors(component, component_transform, object_types, actor_class_filter, actors_to_ignore)Array(Actor) or None

Returns an array of actors that overlap the given component.

Parameters
Returns

true if there was an overlap that passed the filters, false otherwise.

out_actors (Array(Actor)): Returned array of actors. Unsorted.

Return type

Array(Actor) or None

classmethod component_overlap_actors_new(component, component_transform, object_types, actor_class_filter, actors_to_ignore)

deprecated: ‘component_overlap_actors_new’ was renamed to ‘component_overlap_actors’.

classmethod component_overlap_components(component, component_transform, object_types, component_class_filter, actors_to_ignore)Array(PrimitiveComponent) or None

Returns an array of components that overlap the given component.

Parameters
Returns

true if there was an overlap that passed the filters, false otherwise.

out_components (Array(PrimitiveComponent)):

Return type

Array(PrimitiveComponent) or None

classmethod component_overlap_components_new(component, component_transform, object_types, component_class_filter, actors_to_ignore)

deprecated: ‘component_overlap_components_new’ was renamed to ‘component_overlap_components’.

classmethod control_screensaver(allow_screen_saver)None

Allows or inhibits screensaver

Parameters

allow_screen_saver (bool) – If false, don’t allow screensaver if possible, otherwise allow default behavior

classmethod conv_interface_to_object(interface)Object

Converts an interfance into an object

Parameters

interface (Interface) –

Returns

Return type

Object

classmethod conv_primary_asset_id_to_string(primary_asset_id)str

Converts a Primary Asset Id to a string. The other direction is not provided because it cannot be validated

Parameters

primary_asset_id (PrimaryAssetId) –

Returns

Return type

str

classmethod conv_primary_asset_type_to_string(primary_asset_type)str

Converts a Primary Asset Type to a string. The other direction is not provided because it cannot be validated

Parameters

primary_asset_type (PrimaryAssetType) –

Returns

Return type

str

classmethod conv_soft_class_path_to_soft_class_ref(soft_class_path)Class

Converts a Soft Class Path into a base Soft Class Reference, this is not guaranteed to be resolvable

Parameters

soft_class_path (SoftClassPath) –

Returns

Return type

Class

classmethod conv_soft_class_reference_to_string(soft_class_reference)str

Converts a Soft Class Reference to a string. The other direction is not provided because it cannot be validated

Parameters

soft_class_reference (Class) –

Returns

Return type

str

classmethod conv_soft_obj_path_to_soft_obj_ref(soft_object_path)Object

Converts a Soft Object Path into a base Soft Object Reference, this is not guaranteed to be resolvable

Parameters

soft_object_path (SoftObjectPath) –

Returns

Return type

Object

classmethod conv_soft_object_reference_to_string(soft_object_reference)str

Converts a Soft Object Reference to a string. The other direction is not provided because it cannot be validated

Parameters

soft_object_reference (Object) –

Returns

Return type

str

classmethod convert_to_absolute_path(filename)str

Converts passed in filename to use a absolute path

Parameters

filename (str) –

Returns

Return type

str

classmethod convert_to_relative_path(filename)str

Converts passed in filename to use a relative path

Parameters

filename (str) –

Returns

Return type

str

classmethod create_copy_for_undo_buffer(object_to_modify)None

Mark as modified.

Parameters

object_to_modify (Object) –

classmethod delay(world_context_object, duration, latent_info)None

Perform a latent action with a delay (specified in seconds). Calling again while it is counting down will be ignored.

Parameters
  • world_context_object (Object) –

  • duration (float) – length of delay (in seconds).

  • latent_info (LatentActionInfo) – The latent action.

classmethod does_implement_interface(test_object, interface)bool

Does Implement Interface

Parameters
Returns

Return type

bool

classmethod draw_debug_arrow(world_context_object, line_start, line_end, arrow_size, line_color, duration=0.0, thickness=0.0)None

Draw directional arrow, pointing from LineStart to LineEnd.

Parameters
classmethod draw_debug_box(world_context_object, center, extent, line_color, rotation=[0.0, 0.0, 0.0], duration=0.0, thickness=0.0)None

Draw a debug box

Parameters
classmethod draw_debug_camera(camera_actor, camera_color=[0.0, 0.0, 0.0, 0.0], duration=0.0)None

Draw a debug camera shape.

Parameters
classmethod draw_debug_capsule(world_context_object, center, half_height, radius, rotation, line_color=[0.0, 0.0, 0.0, 0.0], duration=0.0, thickness=0.0)None

Draw a debug capsule

Parameters
classmethod draw_debug_circle(world_context_object, center, radius, num_segments=12, line_color=[0.0, 0.0, 0.0, 0.0], duration=0.0, thickness=0.0, y_axis=[0.0, 1.0, 0.0], z_axis=[0.0, 0.0, 1.0], draw_axis=False)None

Draw a debug circle!

Parameters
classmethod draw_debug_cone(world_context_object, origin, direction, length, angle_width, angle_height, num_sides, line_color, duration=0.0, thickness=0.0)None

Draw a debug cone deprecated: DrawDebugCone has been changed to use degrees for angles instead of radians. Place a new DrawDebugCone node and pass your angles as degrees.

Parameters
classmethod draw_debug_cone_in_degrees(world_context_object, origin, direction, length=100.0, angle_width=45.0, angle_height=45.0, num_sides=12, line_color=[0.0, 0.0, 0.0, 0.0], duration=0.0, thickness=0.0)None

Draw a debug cone Angles are specified in degrees

Parameters
classmethod draw_debug_coordinate_system(world_context_object, axis_loc, axis_rot, scale=1.0, duration=0.0, thickness=0.0)None

Draw a debug coordinate system.

Parameters
classmethod draw_debug_cylinder(world_context_object, start, end, radius=100.0, segments=12, line_color=[0.0, 0.0, 0.0, 0.0], duration=0.0, thickness=0.0)None

Draw a debug cylinder

Parameters
classmethod draw_debug_float_history_location(world_context_object, float_history, draw_location, draw_size, draw_color=[0.0, 0.0, 0.0, 0.0], duration=0.0)None

Draws a 2D Histogram of size ‘DrawSize’ based FDebugFloatHistory struct, using DrawLocation for the location in the world, rotation will face camera of first player.

Parameters
classmethod draw_debug_float_history_transform(world_context_object, float_history, draw_transform, draw_size, draw_color=[0.0, 0.0, 0.0, 0.0], duration=0.0)None

Draws a 2D Histogram of size ‘DrawSize’ based FDebugFloatHistory struct, using DrawTransform for the position in the world.

Parameters
classmethod draw_debug_frustum(world_context_object, frustum_transform, frustum_color=[0.0, 0.0, 0.0, 0.0], duration=0.0, thickness=0.0)None

Draws a debug frustum.

Parameters
classmethod draw_debug_line(world_context_object, line_start, line_end, line_color, duration=0.0, thickness=0.0)None

Draw a debug line

Parameters
classmethod draw_debug_plane(world_context_object, plane_coordinates, location, size, plane_color=[0.0, 0.0, 0.0, 0.0], duration=0.0)None

Draws a debug plane.

Parameters
classmethod draw_debug_point(world_context_object, position, size, point_color, duration=0.0)None

Draw a debug point

Parameters
classmethod draw_debug_sphere(world_context_object, center, radius=100.0, segments=12, line_color=[0.0, 0.0, 0.0, 0.0], duration=0.0, thickness=0.0)None

Draw a debug sphere

Parameters
classmethod draw_debug_string(world_context_object, text_location, text, test_base_actor=None, text_color=[0.0, 0.0, 0.0, 0.0], duration=0.0)None

Draw a debug string at a 3d world location.

Parameters
classmethod end_transaction()int32

Attempt to end the current undo transaction. Only successful if the transaction’s action counter is 1. note: Only available in the editor.

Returns

The number of active actions when EndTransaction was called (a value of 1 indicates that the transaction was successfully closed), or -1 on failure.

Return type

int32

classmethod equal_equal_primary_asset_id(a, b)bool

Returns true if the values are equal (A == B)

Parameters
Returns

Return type

bool

classmethod equal_equal_primary_asset_type(a, b)bool

Returns true if the values are equal (A == B)

Parameters
Returns

Return type

bool

classmethod equal_equal_soft_class_reference(a, b)bool

Returns true if the values are equal (A == B)

Parameters
Returns

Return type

bool

classmethod equal_equal_soft_object_reference(a, b)bool

Returns true if the values are equal (A == B)

Parameters
Returns

Return type

bool

classmethod execute_console_command(world_context_object, command, specific_player=None)None

Executes a console command, optionally on a specific controller

Parameters
  • world_context_object (Object) –

  • command (str) – Command to send to the console

  • specific_player (PlayerController) – If specified, the console command will be routed through the specified player

classmethod experimental_close_ad_banner()

deprecated: ‘experimental_close_ad_banner’ was renamed to ‘force_close_ad_banner’.

classmethod experimental_hide_ad_banner()

deprecated: ‘experimental_hide_ad_banner’ was renamed to ‘hide_ad_banner’.

classmethod experimental_show_ad_banner(ad_id_index, show_on_bottom_of_screen)

deprecated: ‘experimental_show_ad_banner’ was renamed to ‘show_ad_banner’.

classmethod experimental_show_game_center_leaderboard(category_name)

deprecated: ‘experimental_show_game_center_leaderboard’ was renamed to ‘show_platform_specific_leaderboard_screen’.

classmethod flush_debug_strings(world_context_object)None

Removes all debug strings.

Parameters

world_context_object (Object) –

classmethod flush_persistent_debug_lines(world_context_object)None

Flush all persistent debug lines and shapes.

Parameters

world_context_object (Object) –

classmethod force_close_ad_banner()None

Forces closed any displayed ad. Can lead to loss of revenue (iOS and Android only)

classmethod get_actor_bounds(actor) -> (origin=Vector, box_extent=Vector)

Get Actor Bounds deprecated: Function ‘GetActorBounds’ is deprecated.

Parameters

actor (Actor) –

Returns

origin (Vector):

box_extent (Vector):

Return type

tuple

classmethod get_actor_list_from_component_list(component_list, actor_class_filter)

Returns an array of unique actors represented by the given list of components.

Parameters
Returns

out_actor_list (Array(Actor)): Start of line segment.

Return type

Array(Actor)

classmethod get_ad_id_count()int32

Retrieves the total number of Ad IDs that can be selected between

Returns

Return type

int32

classmethod get_class_display_name(class_)str

Returns the display name of a class

Parameters

class (type(Class)) –

Returns

Return type

str

classmethod get_class_from_primary_asset_id(primary_asset_id)

Returns the Blueprint Class associated with a Primary Asset Id, this will only return a valid object if it is in memory, it will not load it

Parameters

primary_asset_id (PrimaryAssetId) –

Returns

Return type

type(Class)

classmethod get_command_line()str

Returns the command line that the process was launched with.

Returns

Return type

str

classmethod get_component_bounds(component) -> (origin=Vector, box_extent=Vector, sphere_radius=float)

Get bounds

Parameters

component (SceneComponent) –

Returns

origin (Vector):

box_extent (Vector):

sphere_radius (float):

Return type

tuple

classmethod get_console_variable_bool_value(variable_name)bool

Evaluates, if it exists, whether the specified integer console variable has a non-zero value (true) or not (false).

Parameters

variable_name (str) – Name of the console variable to find.

Returns

True if found and has a non-zero value, false otherwise.

Return type

bool

classmethod get_console_variable_float_value(variable_name)float

Attempts to retrieve the value of the specified float console variable, if it exists.

Parameters

variable_name (str) – Name of the console variable to find.

Returns

The value if found, 0 otherwise.

Return type

float

classmethod get_console_variable_int_value(variable_name)int32

Attempts to retrieve the value of the specified integer console variable, if it exists.

Parameters

variable_name (str) – Name of the console variable to find.

Returns

The value if found, 0 otherwise.

Return type

int32

classmethod get_convenient_windowed_resolutions()Array(IntPoint) or None

Gets the list of windowed resolutions which are convenient for the current primary display size.

Returns

true if successfully queried the device for available resolutions.

resolutions (Array(IntPoint)):

Return type

Array(IntPoint) or None

classmethod get_current_bundle_state(primary_asset_id, force_current_state)Array(Name) or None

Returns the list of loaded bundles for a given Primary Asset. This will return false if the asset is not loaded at all. If ForceCurrentState is true it will return the current state even if a load is in process

Parameters
Returns

out_bundles (Array(Name)):

Return type

Array(Name) or None

classmethod get_default_language()str

Get the default language (for localization) used by this platform note: This is typically the same as GetDefaultLocale unless the platform distinguishes between the two note: This should be returned in IETF language tag form: - A two-letter ISO 639-1 language code (eg, “zh”) - An optional four-letter ISO 15924 script code (eg, “Hans”) - An optional two-letter ISO 3166-1 country code (eg, “CN”)

Returns

The language as an IETF language tag (eg, “zh-Hans-CN”)

Return type

str

classmethod get_default_locale()str

Get the default locale (for internationalization) used by this platform note: This should be returned in IETF language tag form: - A two-letter ISO 639-1 language code (eg, “zh”) - An optional four-letter ISO 15924 script code (eg, “Hans”) - An optional two-letter ISO 3166-1 country code (eg, “CN”)

Returns

The locale as an IETF language tag (eg, “zh-Hans-CN”)

Return type

str

classmethod get_device_id()str

Returns the platform specific unique device id

Returns

Return type

str

classmethod get_display_name(object)str

Returns the display name (or actor label), for displaying as a debugging aid. Note: In editor builds, this is the actor label. In non-editor builds, this is the actual object name. This function should not be used to uniquely identify actors! It is not localized and should not be used for display to an end user of a game.

Parameters

object (Object) –

Returns

Return type

str

classmethod get_engine_version()str

Engine build number, for displaying to end users.

Returns

Return type

str

classmethod get_frame_count()int64

Returns the value of GFrameCounter, a running count of the number of frames that have occurred.

Returns

Return type

int64

classmethod get_game_bundle_id()str

Retrieves the game’s platform-specific bundle identifier or package name of the game

Returns

The game’s bundle identifier or package name.

Return type

str

classmethod get_game_name()str

Get the name of the current game

Returns

Return type

str

classmethod get_game_time_in_seconds(world_context_object)float

Get the current game time, in seconds. This stops when the game is paused and is affected by slomo.

Parameters

world_context_object (Object) – World context

Returns

Return type

float

classmethod get_gamepad_button_glyph(button_key, controller_index)Texture2D

Returns glyph assigned to a gamepad button (or a null ptr if not assigned) (iOS and tvOS only)

Parameters
  • button_key (str) –

  • controller_index (int32) –

Returns

Return type

Texture2D

classmethod get_gamepad_controller_name(controller_id)str

Returns name of controller if assigned to a gamepad (or None if not assigned) (Android and iOS only)

Parameters

controller_id (int32) –

Returns

Return type

str

classmethod get_local_currency_code()str

Returns the currency code associated with the device’s locale

Returns

the currency code associated with the device’s locale

Return type

str

classmethod get_local_currency_symbol()str

Returns the currency symbol associated with the device’s locale

Returns

the currency symbol associated with the device’s locale

Return type

str

classmethod get_min_y_resolution_for3d_view()int32

Gets the smallest Y resolution we want to support in the 3D view, clamped within reasons

Returns

value in pixels

Return type

int32

classmethod get_min_y_resolution_for_ui()int32

Gets the smallest Y resolution we want to support in the UI, clamped within reasons

Returns

value in pixels

Return type

int32

classmethod get_object_from_primary_asset_id(primary_asset_id)Object

Returns the Object associated with a Primary Asset Id, this will only return a valid object if it is in memory, it will not load it

Parameters

primary_asset_id (PrimaryAssetId) –

Returns

Return type

Object

classmethod get_object_name(object)str

Returns the actual object name.

Parameters

object (Object) –

Returns

Return type

str

classmethod get_outer_object(object)Object

Returns the outer object of an object.

Parameters

object (Object) –

Returns

Return type

Object

classmethod get_path_name(object)str

Returns the full path to the specified object.

Parameters

object (Object) –

Returns

Return type

str

classmethod get_platform_user_dir()str

Get the current user dir from the OS

Returns

Return type

str

classmethod get_platform_user_name()str

Get the current user name from the OS

Returns

Return type

str

classmethod get_preferred_languages()

Returns an array of the user’s preferred languages in order of preference

Returns

An array of language IDs ordered from most preferred to least

Return type

Array(str)

classmethod get_primary_asset_id_from_class(class_)PrimaryAssetId

Returns the Primary Asset Id for a Class, this can return an invalid one if not registered

Parameters

class (type(Class)) –

Returns

Return type

PrimaryAssetId

classmethod get_primary_asset_id_from_object(object)PrimaryAssetId

Returns the Primary Asset Id for an Object, this can return an invalid one if not registered

Parameters

object (Object) –

Returns

Return type

PrimaryAssetId

classmethod get_primary_asset_id_from_soft_class_reference(soft_class_reference)PrimaryAssetId

Returns the Primary Asset Id for a Soft Class Reference, this can return an invalid one if not registered

Parameters

soft_class_reference (Class) –

Returns

Return type

PrimaryAssetId

classmethod get_primary_asset_id_from_soft_object_reference(soft_object_reference)PrimaryAssetId

Returns the Primary Asset Id for a Soft Object Reference, this can return an invalid one if not registered

Parameters

soft_object_reference (Object) –

Returns

Return type

PrimaryAssetId

classmethod get_primary_asset_id_list(primary_asset_type)

Returns list of PrimaryAssetIds for a PrimaryAssetType

Parameters

primary_asset_type (PrimaryAssetType) –

Returns

out_primary_asset_id_list (Array(PrimaryAssetId)):

Return type

Array(PrimaryAssetId)

classmethod get_primary_assets_with_bundle_state(required_bundles, excluded_bundles, valid_types, force_current_state)

Returns the list of assets that are in a given bundle state. Required Bundles must be specified If ExcludedBundles is not empty, it will not return any assets in those bundle states If ValidTypes is not empty, it will only return assets of those types If ForceCurrentState is true it will use the current state even if a load is in process

Parameters
Returns

out_primary_asset_id_list (Array(PrimaryAssetId)):

Return type

Array(PrimaryAssetId)

classmethod get_project_content_directory()str

Get the content directory of the current project

Returns

Return type

str

classmethod get_project_directory()str

Get the directory of the current project

Returns

Return type

str

classmethod get_project_saved_directory()str

Get the saved directory of the current project

Returns

Return type

str

classmethod get_rendering_detail_mode()int32

Get the clamped state of r.DetailMode, see console variable help (allows for scalability, cannot be used in construction scripts) 0: low, show only object with DetailMode low or higher 1: medium, show all object with DetailMode medium or higher 2: high, show all objects

Returns

Return type

int32

classmethod get_rendering_material_quality_level()int32

Get the clamped state of r.MaterialQualityLevel, see console variable help (allows for scalability, cannot be used in construction scripts) 0: low 1: high 2: medium

Returns

Return type

int32

classmethod get_soft_class_reference_from_primary_asset_id(primary_asset_id)Class

Returns the Blueprint Class Id associated with a Primary Asset Id, this works even if the asset is not loaded

Parameters

primary_asset_id (PrimaryAssetId) –

Returns

Return type

Class

classmethod get_soft_object_reference_from_primary_asset_id(primary_asset_id)Object

Returns the Object Id associated with a Primary Asset Id, this works even if the asset is not loaded

Parameters

primary_asset_id (PrimaryAssetId) –

Returns

Return type

Object

classmethod get_supported_fullscreen_resolutions()Array(IntPoint) or None

Gets the list of support fullscreen resolutions.

Returns

true if successfully queried the device for available resolutions.

resolutions (Array(IntPoint)):

Return type

Array(IntPoint) or None

classmethod get_system_path(object)str

Returns the full system path to a UObject If given a non-asset UObject, it will return an empty string

Parameters

object (Object) –

Returns

Return type

str

classmethod get_timer_elapsed_time(object, function_name)float

Returns elapsed time for the given delegate (time since current countdown iteration began).

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

Returns

How long has elapsed since the current iteration of the timer began.

Return type

float

classmethod get_timer_elapsed_time_delegate(delegate)float

Returns elapsed time for the given delegate (time since current countdown iteration began). deprecated: Use Get Timer Elapsed Time by Handle

Parameters

delegate (TimerDynamicDelegate) –

Returns

How long has elapsed since the current iteration of the timer began.

Return type

float

classmethod get_timer_elapsed_time_handle(world_context_object, handle)float

Returns elapsed time for the given handle (time since current countdown iteration began).

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to get the elapsed time of.

Returns

How long has elapsed since the current iteration of the timer began.

Return type

float

classmethod get_timer_remaining_time(object, function_name)float

Returns time until the timer will next execute its delegate.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

Returns

How long is remaining in the current iteration of the timer.

Return type

float

classmethod get_timer_remaining_time_delegate(delegate)float

Returns time until the timer will next execute its delegate. deprecated: Use Get Timer Remaining Time by Handle

Parameters

delegate (TimerDynamicDelegate) –

Returns

How long is remaining in the current iteration of the timer.

Return type

float

classmethod get_timer_remaining_time_handle(world_context_object, handle)float

Returns time until the timer will next execute its handle.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to time remaining of.

Returns

How long is remaining in the current iteration of the timer.

Return type

float

classmethod get_unique_device_id()str

Returns the platform specific unique device id deprecated: Use GetDeviceId instead

Returns

Return type

str

classmethod get_volume_buttons_handled_by_system()bool

Returns true if system default handling of volume up and volume down buttons enabled (Android only)

Returns

Return type

bool

classmethod hide_ad_banner()None

Hides the ad banner (iAd on iOS, or AdMob on Android). Will force close the ad if it’s open (iOS and Android only)

classmethod invalidate_timer_handle(handle) -> (TimerHandle, handle=TimerHandle)

Invalidate the supplied TimerHandle and return it.

Parameters

handle (TimerHandle) – The handle of the timer to invalidate.

Returns

Return the invalidated timer handle for convenience.

handle (TimerHandle): The handle of the timer to invalidate.

Return type

TimerHandle

classmethod is_controller_assigned_to_gamepad(controller_id)bool

Returns true if controller id assigned to a gamepad (Android and iOS only)

Parameters

controller_id (int32) –

Returns

Return type

bool

classmethod is_dedicated_server(world_context_object)bool

Returns whether this is running on a dedicated server

Parameters

world_context_object (Object) –

Returns

Return type

bool

classmethod is_interstitial_ad_available()bool

Returns true if the requested interstitial ad is loaded and ready (Android only)

Returns

Return type

bool

classmethod is_interstitial_ad_requested()bool

Returns true if the requested interstitial ad has been successfully requested (false if load request fails) (Android only)

Returns

Return type

bool

classmethod is_logged_in(specific_player)bool

Returns whether the player is logged in to the currently active online subsystem.

Parameters

specific_player (PlayerController) –

Returns

Return type

bool

classmethod is_packaged_for_distribution()bool

Returns whether this is a build that is packaged for distribution

Returns

Return type

bool

classmethod is_screensaver_enabled()bool

Returns true if screen saver is enabled.

Returns

Return type

bool

classmethod is_server(world_context_object)bool

Returns whether the world this object is in is the host or not

Parameters

world_context_object (Object) –

Returns

Return type

bool

classmethod is_split_screen(world_context_object)bool

Returns whether we’re currently running in split screen (more than one local player).

Parameters

world_context_object (Object) –

Returns

Return type

bool

classmethod is_standalone(world_context_object)bool

Returns whether this game instance is stand alone (no networking).

Parameters

world_context_object (Object) –

Returns

Return type

bool

classmethod is_timer_active(object, function_name)bool

Returns true if a timer exists and is active for the given delegate, false otherwise.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

Returns

True if the timer exists and is active.

Return type

bool

classmethod is_timer_active_delegate(delegate)bool

Returns true if a timer exists and is active for the given delegate, false otherwise. deprecated: Use Is Timer Active by Handle

Parameters

delegate (TimerDynamicDelegate) –

Returns

True if the timer exists and is active.

Return type

bool

classmethod is_timer_active_handle(world_context_object, handle)bool

Returns true if a timer exists and is active for the given handle, false otherwise.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to check whether it is active.

Returns

True if the timer exists and is active.

Return type

bool

classmethod is_timer_paused(object, function_name)bool

Returns true if a timer exists and is paused for the given delegate, false otherwise.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

Returns

True if the timer exists and is paused.

Return type

bool

classmethod is_timer_paused_delegate(delegate)bool

Returns true if a timer exists and is paused for the given delegate, false otherwise. deprecated: Use Is Timer Paused by Handle

Parameters

delegate (TimerDynamicDelegate) –

Returns

True if the timer exists and is paused.

Return type

bool

classmethod is_timer_paused_handle(world_context_object, handle)bool

Returns true if a timer exists and is paused for the given handle, false otherwise.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to check whether it is paused.

Returns

True if the timer exists and is paused.

Return type

bool

classmethod is_unattended()bool

Returns true if running unattended (-unattended is on the command line)

Returns

Unattended state

Return type

bool

classmethod is_valid(object)bool

Return true if the object is usable : non-null and not pending kill

Parameters

object (Object) –

Returns

Return type

bool

classmethod is_valid_class(class_)bool

Return true if the class is usable : non-null and not pending kill

Parameters

class (type(Class)) –

Returns

Return type

bool

classmethod is_valid_primary_asset_id(primary_asset_id)bool

Returns true if the Primary Asset Id is valid

Parameters

primary_asset_id (PrimaryAssetId) –

Returns

Return type

bool

classmethod is_valid_primary_asset_type(primary_asset_type)bool

Returns list of Primary Asset Ids for a PrimaryAssetType

Parameters

primary_asset_type (PrimaryAssetType) –

Returns

Return type

bool

classmethod is_valid_soft_class_reference(soft_class_reference)bool

Returns true if the Soft Class Reference is not null

Parameters

soft_class_reference (Class) –

Returns

Return type

bool

classmethod is_valid_soft_object_reference(soft_object_reference)bool

Returns true if the Soft Object Reference is not null

Parameters

soft_object_reference (Object) –

Returns

Return type

bool

classmethod is_valid_timer_handle(handle)bool

Returns whether the timer handle is valid. This does not indicate that there is an active timer that this handle references, but rather that it once referenced a valid timer.

Parameters

handle (TimerHandle) – The handle of the timer to check validity of.

Returns

Whether the timer handle is valid.

Return type

bool

classmethod launch_url(url)None

Opens the specified URL in the platform’s web browser of choice

Parameters

url (str) –

classmethod line_trace_multi(world_context_object, start, end, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Does a collision trace along the given line and returns all hits encountered up to and including the first blocking hit. This trace finds the objects that RESPOND to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • trace_channel (TraceTypeQuery) – The channel to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)):

Return type

Array(HitResult) or None

classmethod line_trace_multi_by_profile(world_context_object, start, end, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Trace a ray against the world using a specific profile and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)):

Return type

Array(HitResult) or None

classmethod line_trace_multi_for_objects(world_context_object, start, end, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Does a collision trace along the given line and returns all hits encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
Returns

True if there was a hit, false otherwise.

out_hits (Array(HitResult)):

Return type

Array(HitResult) or None

classmethod line_trace_multi_new(world_context_object, start, end, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)

deprecated: ‘line_trace_multi_new’ was renamed to ‘line_trace_multi’.

classmethod line_trace_single(world_context_object, start, end, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Does a collision trace along the given line and returns the first blocking hit encountered. This trace finds the objects that RESPONDS to the given TraceChannel

Parameters
Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod line_trace_single_by_profile(world_context_object, start, end, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Trace a ray against the world using a specific profile and return the first blocking hit

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod line_trace_single_for_objects(world_context_object, start, end, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Does a collision trace along the given line and returns the first hit encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod line_trace_single_new(world_context_object, start, end, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)

deprecated: ‘line_trace_single_new’ was renamed to ‘line_trace_single’.

classmethod load_asset_blocking(asset)Object

Resolves or loads a Soft Object Reference immediately, this will cause hitches and Async Load Asset should be used if possible

Parameters

asset (Object) –

Returns

Return type

Object

classmethod load_class_asset_blocking(asset_class)

Resolves or loads a Soft Class Reference immediately, this will cause hitches and Async Load Class Asset should be used if possible

Parameters

asset_class (Class) –

Returns

Return type

type(Class)

classmethod load_interstitial_ad(ad_id_index)None

Will load a fullscreen interstitial AdMob ad. Call this before using ShowInterstitialAd (Android only)

Parameters

ad_id_index (int32) – The index of the ID to select for the ad to show

classmethod make_literal_bool(value)bool

Creates a literal bool

Parameters

value (bool) – value to set the bool to

Returns

The literal bool

Return type

bool

classmethod make_literal_byte(value)uint8

Creates a literal byte

Parameters

value (uint8) – value to set the byte to

Returns

The literal byte

Return type

uint8

classmethod make_literal_float(value)float

Creates a literal float

Parameters

value (float) – value to set the float to

Returns

The literal float

Return type

float

classmethod make_literal_int(value)int32

Creates a literal integer

Parameters

value (int32) – value to set the integer to

Returns

The literal integer

Return type

int32

classmethod make_literal_name(value)Name

Creates a literal name

Parameters

value (Name) – value to set the name to

Returns

The literal name

Return type

Name

classmethod make_literal_string(value)str

Creates a literal string

Parameters

value (str) – value to set the string to

Returns

The literal string

Return type

str

classmethod make_literal_text(value)Text

Creates a literal FText

Parameters

value (Text) – value to set the FText to

Returns

The literal FText

Return type

Text

classmethod move_component_to(component, target_relative_location, target_relative_rotation, ease_out, ease_in, over_time, force_shortest_rotation_path, move_action, latent_info)None
  • Interpolate a component to the specified relative location and rotation over the course of OverTime seconds.

see: EMoveComponentAction *

Parameters
  • component (SceneComponent) – Component to interpolate *

  • target_relative_location (Vector) – Relative target location *

  • target_relative_rotation (Rotator) – Relative target rotation *

  • ease_out (bool) – if true we will ease out (ie end slowly) during interpolation *

  • ease_in (bool) – if true we will ease in (ie start slowly) during interpolation *

  • over_time (float) – duration of interpolation *

  • force_shortest_rotation_path (bool) – if true we will always use the shortest path for rotation *

  • move_action (MoveComponentAction) – required movement behavior

  • latent_info (LatentActionInfo) – The latent action

classmethod normalize_filename(filename)str

Convert all / and to TEXT(“/”)

Parameters

filename (str) –

Returns

Return type

str

classmethod not_equal_primary_asset_id(a, b)bool

Returns true if the values are not equal (A != B)

Parameters
Returns

Return type

bool

classmethod not_equal_primary_asset_type(a, b)bool

Returns true if the values are not equal (A != B)

Parameters
Returns

Return type

bool

classmethod not_equal_soft_class_reference(a, b)bool

Returns true if the values are not equal (A != B)

Parameters
Returns

Return type

bool

classmethod not_equal_soft_object_reference(a, b)bool

Returns true if the values are not equal (A != B)

Parameters
Returns

Return type

bool

classmethod parse_command_line(cmd_line) -> (out_tokens=Array(str), out_switches=Array(str), out_params=Map(str, str))
  • Parses the given string into loose tokens, switches (arguments that begin with - or /) and parameters (-mySwitch=myVar)

Parameters

cmd_line (str) – The the string to parse (ie ‘-foo -bar=/game/baz testtoken’ ) *

Returns

out_tokens (Array(str)):

out_switches (Array(str)):

out_params (Map(str, str)):

Return type

tuple

classmethod parse_param(string, param)bool

Returns true if the string has -param in it (do not specify the leading -)

Parameters
  • string (str) –

  • param (str) –

Returns

Return type

bool

classmethod parse_param_value(string, param)str or None

Returns ‘value’ if -option=value is in the string

Parameters
  • string (str) –

  • param (str) –

Returns

out_value (str):

Return type

str or None

classmethod pause_timer(object, function_name)None

Pauses a set timer at its current elapsed time.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

classmethod pause_timer_delegate(delegate)None

Pauses a set timer at its current elapsed time. deprecated: Use Pause Timer by Handle

Parameters

delegate (TimerDynamicDelegate) –

classmethod pause_timer_handle(world_context_object, handle)None

Pauses a set timer at its current elapsed time.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to pause.

classmethod print_string(world_context_object, string='Hello', print_to_screen=True, print_to_log=True, text_color=[0.0, 0.0, 0.0, 0.0], duration=2.0)None

Prints a string to the log, and optionally, to the screen If Print To Log is true, it will be visible in the Output Log window. Otherwise it will be logged only as ‘Verbose’, so it generally won’t show up.

Parameters
  • world_context_object (Object) –

  • string (str) – The string to log out

  • print_to_screen (bool) – Whether or not to print the output to the screen

  • print_to_log (bool) – Whether or not to print the output to the log

  • text_color (LinearColor) – Whether or not to print the output to the console

  • duration (float) – The display duration (if Print to Screen is True). Using negative number will result in loading the duration time from the config.

classmethod print_text(world_context_object, text='Hello', print_to_screen=True, print_to_log=True, text_color=[0.0, 0.0, 0.0, 0.0], duration=2.0)None

Prints text to the log, and optionally, to the screen If Print To Log is true, it will be visible in the Output Log window. Otherwise it will be logged only as ‘Verbose’, so it generally won’t show up.

Parameters
  • world_context_object (Object) –

  • text (Text) – The text to log out

  • print_to_screen (bool) – Whether or not to print the output to the screen

  • print_to_log (bool) – Whether or not to print the output to the log

  • text_color (LinearColor) – Whether or not to print the output to the console

  • duration (float) – The display duration (if Print to Screen is True). Using negative number will result in loading the duration time from the config.

classmethod quit_editor()None

Exit the editor

classmethod quit_game(world_context_object, specific_player, quit_preference, ignore_platform_restrictions)None

Exit the current game

Parameters
  • world_context_object (Object) –

  • specific_player (PlayerController) – The specific player to quit the game. If not specified, player 0 will quit.

  • quit_preference (QuitPreference) – Form of quitting.

  • ignore_platform_restrictions (bool) – Ignores and best-practices based on platform (e.g PS4 games should never quit). Non-shipping only

classmethod register_for_remote_notifications()None

Requests permission to send remote notifications to the user’s device. (Android and iOS only)

classmethod reset_gamepad_assignment_to_controller(controller_id)None
  • Resets the gamepad assignment to player controller id (Android and iOS only)

Parameters

controller_id (int32) –

classmethod reset_gamepad_assignments()None

Resets the gamepad to player controller id assignments (Android and iOS only)

classmethod retriggerable_delay(world_context_object, duration, latent_info)None

Perform a latent action with a retriggerable delay (specified in seconds). Calling again while it is counting down will reset the countdown to Duration.

Parameters
  • world_context_object (Object) –

  • duration (float) – length of delay (in seconds).

  • latent_info (LatentActionInfo) – The latent action.

classmethod set_gamepads_block_device_feedback(block)None

Sets whether attached gamepads will block feedback from the device itself (Mobile only).

Parameters

block (bool) –

classmethod set_suppress_viewport_transition_message(world_context_object, state)None

Sets the state of the transition message rendered by the viewport. (The blue text displayed when the game is paused and so forth.)

Parameters
  • world_context_object (Object) – World context

  • state (bool) –

classmethod set_supress_viewport_transition_message(world_context_object, state)

deprecated: ‘set_supress_viewport_transition_message’ was renamed to ‘set_suppress_viewport_transition_message’.

classmethod set_timer(object, function_name, time, looping, initial_start_delay=0.0, initial_start_delay_variance=0.0)TimerHandle

Set a timer to execute delegate. Setting an existing timer will reset that timer with updated parameters.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

  • time (float) – How long to wait before executing the delegate, in seconds. Setting a timer to <= 0 seconds will clear it if it is set.

  • looping (bool) – true to keep executing the delegate every Time seconds, false to execute delegate only once.

  • initial_start_delay (float) – Initial delay passed to the timer manager to allow some variance in when the timer starts, in seconds.

  • initial_start_delay_variance (float) – Use this to add some variance to when the timer starts in lieu of doing a random range on the InitialStartDelay input, in seconds.

Returns

The timer handle to pass to other timer functions to manipulate this timer.

Return type

TimerHandle

classmethod set_timer_delegate(delegate, time, looping, initial_start_delay=0.0, initial_start_delay_variance=0.0)TimerHandle

Set a timer to execute delegate. Setting an existing timer will reset that timer with updated parameters.

Parameters
  • delegate (TimerDynamicDelegate) –

  • time (float) – How long to wait before executing the delegate, in seconds. Setting a timer to <= 0 seconds will clear it if it is set.

  • looping (bool) – True to keep executing the delegate every Time seconds, false to execute delegate only once.

  • initial_start_delay (float) – Initial delay passed to the timer manager, in seconds.

  • initial_start_delay_variance (float) – Use this to add some variance to when the timer starts in lieu of doing a random range on the InitialStartDelay input, in seconds.

Returns

The timer handle to pass to other timer functions to manipulate this timer.

Return type

TimerHandle

classmethod set_user_activity(user_activity)None

Tells the engine what the user is doing for debug, analytics, etc.

Parameters

user_activity (UserActivity) –

classmethod set_volume_buttons_handled_by_system(enabled)None

Allows or inhibits system default handling of volume up and volume down buttons (Android only)

Parameters

enabled (bool) – If true, allow Android to handle volume up and down events

classmethod set_window_title(title)None

Sets the game window title

Parameters

title (Text) –

classmethod show_ad_banner(ad_id_index, show_on_bottom_of_screen)None

Will show an ad banner (iAd on iOS, or AdMob on Android) on the top or bottom of screen, on top of the GL view (doesn’t resize the view) (iOS and Android only)

Parameters
  • ad_id_index (int32) – The index of the ID to select for the ad to show

  • show_on_bottom_of_screen (bool) – If true, the iAd will be shown at the bottom of the screen, top otherwise

classmethod show_interstitial_ad()None

Shows the loaded interstitial ad (loaded with LoadInterstitialAd) (Android only)

classmethod show_platform_specific_achievements_screen(specific_player)None

Displays the built-in achievements GUI (iOS and Android only; this function may be renamed or moved in a future release)

Parameters

specific_player (PlayerController) – Specific player’s achievements to show. May not be supported on all platforms. If null, defaults to the player with ControllerId 0

classmethod show_platform_specific_leaderboard_screen(category_name)None

Displays the built-in leaderboard GUI (iOS and Android only; this function may be renamed or moved in a future release)

Parameters

category_name (str) –

classmethod snapshot_object(object)None

Notify the current transaction (if any) that this object is about to be modified and should be snapshot for intermediate update. note: Internally this calls SnapshotTransactionBuffer on the given object. note: Only available in the editor.

Parameters

object (Object) – The object that is about to be modified.

classmethod sphere_overlap_actors(world_context_object, sphere_pos, sphere_radius, object_types, actor_class_filter, actors_to_ignore)Array(Actor) or None

Returns an array of actors that overlap the given sphere.

Parameters
Returns

true if there was an overlap that passed the filters, false otherwise.

out_actors (Array(Actor)): Returned array of actors. Unsorted.

Return type

Array(Actor) or None

classmethod sphere_overlap_actors_new(world_context_object, sphere_pos, sphere_radius, object_types, actor_class_filter, actors_to_ignore)

deprecated: ‘sphere_overlap_actors_new’ was renamed to ‘sphere_overlap_actors’.

classmethod sphere_overlap_components(world_context_object, sphere_pos, sphere_radius, object_types, component_class_filter, actors_to_ignore)Array(PrimitiveComponent) or None

Returns an array of components that overlap the given sphere.

Parameters
Returns

true if there was an overlap that passed the filters, false otherwise.

out_components (Array(PrimitiveComponent)):

Return type

Array(PrimitiveComponent) or None

classmethod sphere_overlap_components_new(world_context_object, sphere_pos, sphere_radius, object_types, component_class_filter, actors_to_ignore)

deprecated: ‘sphere_overlap_components_new’ was renamed to ‘sphere_overlap_components’.

classmethod sphere_trace_multi(world_context_object, start, end, radius, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweeps a sphere along the given line and returns all hits encountered up to and including the first blocking hit. This trace finds the objects that RESPOND to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the sphere to sweep

  • trace_channel (TraceTypeQuery) –

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod sphere_trace_multi_by_profile(world_context_object, start, end, radius, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweep a sphere against the world and return all initial overlaps using a specific profile, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the sphere to sweep

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a blocking hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod sphere_trace_multi_for_objects(world_context_object, start, end, radius, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)Array(HitResult) or None

Sweeps a sphere along the given line and returns all hits encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the sphere to sweep

  • object_types (Array(ObjectTypeQuery)) – Array of Object Types to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hits (Array(HitResult)): A list of hits, sorted along the trace from start to finish. The blocking hit will be the last hit, if there was one.

Return type

Array(HitResult) or None

classmethod sphere_trace_multi_new(world_context_object, start, end, radius, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)

deprecated: ‘sphere_trace_multi_new’ was renamed to ‘sphere_trace_multi’.

classmethod sphere_trace_single(world_context_object, start, end, radius, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweeps a sphere along the given line and returns the first blocking hit encountered. This trace finds the objects that RESPONDS to the given TraceChannel

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the sphere to sweep

  • trace_channel (TraceTypeQuery) –

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod sphere_trace_single_by_profile(world_context_object, start, end, radius, profile_name, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweep a sphere against the world and return the first blocking hit using a specific profile

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the sphere to sweep

  • profile_name (Name) – The ‘profile’ used to determine which components to hit

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod sphere_trace_single_for_objects(world_context_object, start, end, radius, object_types, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)HitResult or None

Sweeps a sphere along the given line and returns the first hit encountered. This only finds objects that are of a type specified by ObjectTypes.

Parameters
  • world_context_object (Object) –

  • start (Vector) – Start of line segment.

  • end (Vector) – End of line segment.

  • radius (float) – Radius of the sphere to sweep

  • object_types (Array(ObjectTypeQuery)) – Array of Object Types to trace

  • trace_complex (bool) – True to test against complex collision, false to test against simplified collision.

  • actors_to_ignore (Array(Actor)) –

  • draw_debug_type (DrawDebugTrace) –

  • ignore_self (bool) –

  • trace_color (LinearColor) –

  • trace_hit_color (LinearColor) –

  • draw_time (float) –

Returns

True if there was a hit, false otherwise.

out_hit (HitResult): Properties of the trace hit.

Return type

HitResult or None

classmethod sphere_trace_single_new(world_context_object, start, end, radius, trace_channel, trace_complex, actors_to_ignore, draw_debug_type, ignore_self, trace_color=[0.0, 0.0, 0.0, 0.0], trace_hit_color=[0.0, 0.0, 0.0, 0.0], draw_time=5.0)

deprecated: ‘sphere_trace_single_new’ was renamed to ‘sphere_trace_single’.

classmethod timer_exists(object, function_name)bool

Returns true is a timer for the given delegate exists, false otherwise.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

Returns

True if the timer exists.

Return type

bool

classmethod timer_exists_delegate(delegate)bool

Returns true is a timer for the given delegate exists, false otherwise. deprecated: Use Does Timer Exist by Handle

Parameters

delegate (TimerDynamicDelegate) –

Returns

True if the timer exists.

Return type

bool

classmethod timer_exists_handle(world_context_object, handle)bool

Returns true is a timer for the given handle exists, false otherwise.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle to check whether it exists.

Returns

True if the timer exists.

Return type

bool

classmethod transact_object(object)None

Notify the current transaction (if any) that this object is about to be modified and should be placed into the undo buffer. note: Internally this calls Modify on the given object, so will also mark the owner package dirty. note: Only available in the editor.

Parameters

object (Object) – The object that is about to be modified.

classmethod un_pause_timer(object, function_name)None

Resumes a paused timer from its current elapsed time.

Parameters
  • object (Object) – Object that implements the delegate function. Defaults to self (this blueprint)

  • function_name (str) – Delegate function name. Can be a K2 function or a Custom Event.

classmethod un_pause_timer_delegate(delegate)None

Resumes a paused timer from its current elapsed time. deprecated: Use Unpause Timer by Handle

Parameters

delegate (TimerDynamicDelegate) –

classmethod un_pause_timer_handle(world_context_object, handle)None

Resumes a paused timer from its current elapsed time.

Parameters
  • world_context_object (Object) –

  • handle (TimerHandle) – The handle of the timer to unpause.

classmethod unload_primary_asset(primary_asset_id)None

Unloads a primary asset, which allows it to be garbage collected if nothing else is referencing it

Parameters

primary_asset_id (PrimaryAssetId) –

classmethod unload_primary_asset_list(primary_asset_id_list)None

Unloads a primary asset, which allows it to be garbage collected if nothing else is referencing it

Parameters

primary_asset_id_list (Array(PrimaryAssetId)) –

classmethod unregister_for_remote_notifications()None

Requests Requests unregistering from receiving remote notifications to the user’s device. (Android only)