mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-07 07:44:53 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
cc840910ce
Binary file not shown.
@ -40,7 +40,7 @@ void USpineBoneDriverComponent::BeginPlay () {
|
||||
}
|
||||
|
||||
void USpineBoneDriverComponent::BeforeUpdateWorldTransform(USpineSkeletonComponent* skeleton) {
|
||||
if (skeleton == lastBoundComponent) {
|
||||
if (skeleton == lastBoundComponent && skeleton) {
|
||||
if (UseComponentTransform) {
|
||||
skeleton->SetBoneWorldPosition(BoneName, GetComponentLocation());
|
||||
}
|
||||
@ -56,7 +56,7 @@ void USpineBoneDriverComponent::TickComponent (float DeltaTime, ELevelTick TickT
|
||||
|
||||
if (Target) {
|
||||
USpineSkeletonComponent* skeleton = static_cast<USpineSkeletonComponent*>(Target->GetComponentByClass(USpineSkeletonComponent::StaticClass()));
|
||||
if (skeleton != lastBoundComponent) {
|
||||
if (skeleton != lastBoundComponent && skeleton) {
|
||||
// if (lastBoundComponent) lastBoundComponent->BeforeUpdateWorldTransform.RemoveAll(this);
|
||||
if (!skeleton->BeforeUpdateWorldTransform.GetAllObjects().Contains(this))
|
||||
skeleton->BeforeUpdateWorldTransform.AddDynamic(this, &USpineBoneDriverComponent::BeforeUpdateWorldTransform);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user