diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp index 956b3f382..f07e5757c 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp @@ -171,6 +171,15 @@ bool USpineSkeletonComponent::GetFlipY() { return false; } +void USpineSkeletonComponent::GetBones(TArray &Bones) { + CheckState(); + if (skeleton) { + for (size_t i = 0, n = skeleton->getBones().size(); i < n; i++) { + Bones.Add(skeleton->getBones()[i]->getData().getName().buffer()); + } + } +} + void USpineSkeletonComponent::BeginPlay() { Super::BeginPlay(); } diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h index fc456c48c..daf53def1 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h @@ -89,6 +89,9 @@ public: UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton") bool GetFlipY(); + + UFUNCTION(BlueprintPure, Category = "Components|Spine|Skeleton") + void GetBones(TArray &Bones); UPROPERTY(BlueprintAssignable, Category = "Components|Spine|Skeleton") FSpineBeforeUpdateWorldTransformDelegate BeforeUpdateWorldTransform;