unreal.NiagaraDataChannelReader

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

Bases: Object

Initial simple API for reading and writing data in a data channel from game code / BP. Likely to be replaced in the near future with a custom BP node and a helper struct.

C++ Source:

  • Plugin: Niagara

  • Module: Niagara

  • File: NiagaraDataChannelAccessor.h

init_access(search_params, read_prev_frame_data) bool

Call before each access to the data channel to grab the correct data to read.

Parameters:
Return type:

bool

num() int32

Num

Return type:

int32

read_bool(var_name, index) bool or None

Read Bool

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool or None

read_enum(var_name, index) -> (uint8, is_valid=bool)

Read Enum

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_float(var_name, index) -> (double, is_valid=bool)

Read Float

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_id(var_name, index) -> (NiagaraID, is_valid=bool)

Read ID

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_int(var_name, index) -> (int32, is_valid=bool)

Read Int

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_linear_color(var_name, index) -> (LinearColor, is_valid=bool)

Read Linear Color

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_position(var_name, index) -> (Vector, is_valid=bool)

Read Position

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_quat(var_name, index) -> (Quat, is_valid=bool)

Read Quat

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_spawn_info(var_name, index) -> (NiagaraSpawnInfo, is_valid=bool)

Read Spawn Info

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_vector(var_name, index) -> (Vector, is_valid=bool)

Read Vector

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_vector2d(var_name, index) -> (Vector2D, is_valid=bool)

Read Vector 2D

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool

read_vector4(var_name, index) -> (Vector4, is_valid=bool)

Read Vector 4

Parameters:
  • var_name (Name) –

  • index (int32) –

Returns:

is_valid (bool):

Return type:

bool