我在.h头文件中添加了三个Montage: 
 
[mw_shl_code=cpp,true]UPROPERTY(EditAnywhere,BlueprintReadWrite) 
                UAnimMontage* PiKan1Montage; 
 
        UPROPERTY(EditAnywhere,BlueprintReadWrite) 
                UAnimMontage* PiKan2Montage; 
 
        UPROPERTY(EditAnywhere, BlueprintReadWrite) 
                UAnimMontage* PiKan3Montage; 
[/mw_shl_code] 
 
 
然后在cpp的PiKan函数里添加 
 
[mw_shl_code=applescript,true]void AOneCharacter: iKan() 
{ 
        if (PiKan1Montage != NULL, PiKan2Montage != NULL, PiKan3Montage != NULL) 
        { 
                UAnimInstance * AnimInstance = Mesh1P->GetAnimInstance(); 
 
                  if (AnimInstance != NULL) 
                  { 
                        AnimInstance->Montage_Play(PiKan1Montage, 1.0f); 
                        AnimInstance->Montage_Play(PiKan2Montage, 1.0f); 
                        AnimInstance->Montage_Play(PiKan2Montage, 1.0f); 
                  } 
        } 
 
} 
[/mw_shl_code] 
 
请问为啥它只会执行PiKan1Montage呢? 
 |