Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UE] Bug: 静态绑定有几个函数绑不了 #1516

Closed
3 tasks done
oVeRoVeRo opened this issue Sep 9, 2023 · 1 comment
Closed
3 tasks done

[UE] Bug: 静态绑定有几个函数绑不了 #1516

oVeRoVeRo opened this issue Sep 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working Unreal

Comments

@oVeRoVeRo
Copy link

前置阅读 | Pre-reading

Puer的版本 | Puer Version

[unreal]新delegate方案的android编译错误以及quickjs上发现的问题的修正 0cf6522

UE的版本 | UE Version

UE5.2

发生在哪个平台 | Platform

Editor(win)

错误信息 | Error Message

静态绑定有几个函数绑不了
相关代码:

UsingUStruct(FPredictionKey);
UsingUStruct(FGameplayAbilityActivationInfo);
        puerts::DefineClass<FGameplayAbilityActivationInfo>()
            .Method("GetActivationPredictionKey", MakeFunction(&FGameplayAbilityActivationInfo::GetActivationPredictionKey))
            .Register();
        puerts::DefineClass<UEnhancedPlayerInput>()
            .Method("GetActionValue", MakeFunction(&UEnhancedPlayerInput::GetActionValue))
            .Register();

问题重现 | Bug reproduce

log:

0>StaticCall.hpp(248): Error C2664 : 'v8::Local<v8::Value> puerts::v8_impl::Converter<FPredictionKey *,void>::toScript(v8::Local<v8::Context>,T *)': cannot convert argument 2 from 'const FPredictionKey *' to 'T *'
0>        with
0>        [
0>            T=FPredictionKey
0>        ]
0>StaticCall.hpp(248): Reference  : Conversion loses qualifiers
0>UEDataBinding.hpp(469): Reference  : see declaration of 'puerts::v8_impl::Converter<FPredictionKey *,void>::toScript'
0>StaticCall.hpp(260): Error C2027 : use of undefined type 'puerts::v8_impl::Converter<TObjectPtr<const UInputAction>,void>'
@oVeRoVeRo oVeRoVeRo added bug Something isn't working Unreal labels Sep 9, 2023
@ljporljp
Copy link
Contributor

要include对应头文件

zombieyang pushed a commit to puerts/puerts_experimental_any_engine that referenced this issue Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Unreal
Projects
None yet
Development

No branches or pull requests

3 participants