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] 静态导出的函数参数类型不对? #1977

Open
isaf opened this issue Feb 12, 2025 · 1 comment
Open

[UE] 静态导出的函数参数类型不对? #1977

isaf opened this issue Feb 12, 2025 · 1 comment

Comments

@isaf
Copy link

isaf commented Feb 12, 2025

Image

Image

Image

2025年1月12日的master代码,这样导出的CPP函数,const TCHAR*类型的参数在脚本的类型是$Ref<string>,这个是不是不太对啊?
1.0.3版本的时候,这样导出的参数类型是string。

@morirain
Copy link
Contributor

virtual bool IsRef() const override
{
return (std::is_reference<T>::value && !std::is_const<typename std::remove_reference<T>::type>::value) ||
(std::is_pointer<T>::value &&
!std::is_same<void, typename std::decay<typename std::remove_pointer<T>::type>::type>::value &&
!std::is_same<char, typename std::decay<typename std::remove_pointer<T>::type>::type>::value &&
ScriptTypePtrAsRef && !IsUEType() && !IsObjectType());
};

因为这里吧,只判断了char类型,TCHAR是UE的宏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants