Calling BP Graph Functions

How to call a function declared in the Blueprint Editor

For Blueprint functions created in the Blueprint Editor we can use call_method() to access them via Python:

asset_instance.call_method("function")

For functions with inputs we can use either the args or kwargs parameters:

asset_instance.call_method("function", args=("inputs_as_a_tuple",))
asset_instance.call_method("function", kwargs={"arg": "value"})

It also works with Blueprint functions that have returns:

value = asset_instance.call_method("function_with_return")

call_method also works with custom events:

Last updated