`
aigo
  • 浏览: 2538369 次
  • 性别: Icon_minigender_1
  • 来自: 宜昌
社区版块
存档分类
最新评论

[UE4]C++设置AnimInstance的相关问题

UE4 
阅读更多

 

UAnimInstance

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Animation/UAnimInstance/index.html

 

AnimInstance是Animation Blueprint的C++版本。

角色蓝图中,设置动画蓝图是设置的Anim Class属性:


 

这个设置的步骤如果用C++操作,如下设置:

USkeletalMeshComponent::SetAnimInstanceClass(UClass* NewClass);

 具体实例:

UAnimBlueprintGeneratedClass* MeshAnim = LoadObject<UAnimBlueprintGeneratedClass>(NULL, TEXT("/Game/Character/HeroTPP_AnimBlueprint.HeroTPP_AnimBlueprint"));
Mesh->SetAnimInstanceClass(MeshAnim);

 

如果想用C++ UAnimInstance代替蓝图动画,那么需要创建一个自己的UAnimInstance,并在其中实现自己的动画逻辑,UAnimInstance里面的具体函数还不熟悉,先标记下,等项目后期再将动画蓝图改为C++。

 

Game Instance, Custom Game Instance For Inter-Level Persistent Data Storage

https://wiki.unrealengine.com/Game_Instance,_Custom_Game_Instance_For_Inter-Level_Persistent_Data_Storage

 

 

  • 大小: 6.4 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics