You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local ABP_Lin_Class = slua.loadClass("/Script/Engine.AnimBlueprint'/Game/Characters/Lin/ABP_Lin.ABP_Lin'")
self.RTGMesh.SetAnimClass(ABP_Lin_Class)
SetAnimClass是SkeletalMeshComponent中的BlueprintCallable函数,
/** Set the anim instance class. Clears and re-initializes the anim instance with the new class and sets animation mode to 'AnimationBlueprint' */
UFUNCTION(BlueprintCallable, Category = "Components|SkeletalMesh", meta = (Keywords = "AnimBlueprint", DisplayName = "Set Anim Instance Class"))
virtual void SetAnimClass(class UClass* NewClass);
然后报错如下
Slua: Error: ...Project/Main/RunbaPet/Content/Lua/RunbaMainCharacter.lua:20: expect userdata UObject at 1, but got UClass, if you passed an UObject, maybe it's unreachable
...Project/Main/RunbaPet/Content/Lua/RunbaMainCharacter.lua:20: in function <...Project/Main/RunbaPet/Content/Lua/RunbaMainCharacter.lua:10>
如果我使用
local ABP_Lin_Class = slua.loadObject("/Script/Engine.AnimBlueprint'/Game/Characters/Lin/ABP_Lin.ABP_Lin'")
self.RTGMesh.SetAnimClass(ABP_Lin_Class)
那么引擎立刻崩溃
The text was updated successfully, but these errors were encountered:
ozbao
changed the title
SetAnimClass的需要传入参数是一个类,但是却必须要我传入UObject
SetAnimClass的需要传入参数是一个UClass,但是却必须要我传入UObject
Aug 31, 2023
如果我使用
local ABP_Lin_Class = slua.loadObject("/Script/Engine.AnimBlueprint'/Game/Characters/Lin/ABP_Lin.ABP_Lin'")
self.RTGMesh.SetAnimClass(ABP_Lin_Class)
那么引擎立刻崩溃
The text was updated successfully, but these errors were encountered: