unreal.PixelStreamingInput

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

Bases: unreal.ActorComponent

This component may be attached to an actor to allow UI interactions to be handled as the delegate will be notified about the interaction and will be supplied with a generic descriptor string containing, for example, JSON data. Responses back to the source of the UI interactions may also be sent.

C++ Source:

  • Plugin: PixelStreaming

  • Module: PixelStreaming

  • File: PixelStreamingInputComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array(AssetUserData)): [Read-Write] Asset User Data: Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Auto Activate: Whether the component is activated at creation or must be explicitly activated.

  • can_ever_affect_navigation (bool): [Read-Write] Can Ever Affect Navigation: Whether this component can potentially influence navigation

  • component_tags (Array(Name)): [Read-Write] Component Tags: Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • editable_when_inherited (bool): [Read-Write] Editable when Inherited: True if this component can be modified when it was inherited from a parent actor class

  • is_editor_only (bool): [Read-Write] Is Editor Only: If true, the component will be excluded from non-editor builds

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] On Component Activated: Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] On Component Deactivated: Called when the component has been deactivated

  • on_input_event (OnInput): [Read-Write] On Input Event

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Primary Component Tick: Main tick function for the Component

  • replicates (bool): [Read-Write] Replicates: Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

add_json_string_value(descriptor, field_name, string_value) -> (new_descriptor=str, success=bool)

Helper function to add a string field to a JSON descriptor. This produces a new descriptor which may then be chained to add further string fields.

Parameters
  • descriptor (str) – The initial JSON descriptor which may be blank initially.

  • field_name (str) – The name of the field to add to the JSON.

  • string_value (str) – The string value associated with the field name.

Returns

new_descriptor (str): The JSON descriptor with the string field added.

success (bool): True if the string field could be added successfully.

Return type

tuple

get_json_string_value(descriptor, field_name) -> (string_value=str, success=bool)

Helper function to extract a string field from a JSON descriptor of a UI interaction given its field name. The field name may be hierarchical, delimited by a period. For example, to access the Width value of a Resolution command above you should use “Resolution.Width” to get the width value.

Parameters
  • descriptor (str) – The UI interaction JSON descriptor.

  • field_name (str) – The name of the field to look for in the JSON.

Returns

string_value (str): The string value associated with the field name.

success (bool): True if the field exists in the JSON data.

Return type

tuple

property on_input_event

[Read-Write] On Input Event

Type

(OnInput)

send_pixel_streaming_response(descriptor) None

Send a response back to the source of the UI interactions.

Parameters

descriptor (str) – A generic descriptor string.