Hello, I want to get components form Blueprint with python, not a bp_actor in GameWorld.
The method below works in UE5.1, but it does not work in UE 4.27,
import unreal
objects = []
subsystem = unreal.get_engine_subsystem(unreal.SubobjectDataSubsystem)
blueprint_asset = unreal.load_asset(blueprint_asset_path)
subobject_data_handles = subsystem.k2_gather_subobject_data_for_blueprint(blueprint_asset)
for handle in subobject_data_handles:
data = unreal.SubobjectDataBlueprintFunctionLibrary.get_data(handle)
object = unreal.SubobjectDataBlueprintFunctionLibrary.get_object(data)
objects.append(object)
for component in objects:
print(component.get_name())