x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

蓝图原生化nativization功能的一个bug

刚刚发现一个nativization编译的一个bug:当原生化蓝图调用一个蓝图函数库中的函数时,如果这个函数返回一个整数,那么打包后的项目所不能得到这个返回值,实际得到的是0。看生成的C++代码发现,这个蓝图函数库函数C++代码如下: struct FUnconvertedWrapper_UBlueTest_Cpf2222656877 : public FUnconvertedWrapper { FUnconvertedWrapperUBlueTest_Cpf2222656877(const UBlueprintFunctionLibrary* InObject) : FUnconvertedWrapper(InObject){} FORCENOINLINE void bpfTest3pf(UObject* bppWorldContextpf, /out/ int32& bppcountpf) { static const FName FunctionName(TEXT("Test3")); UFunction* Function = Object->FindFunctionChecked(FunctionName); struct bpfTest3pf_Parameters { UObject* bppWorldContextpf; int32 bpp_countpf; }; bpf_Test3pf_Parameters Parameters { bpp__WorldContextpf, bppcountpf }; Object->ProcessEvent(Function, &Parameters); } }; bpfTest3pf_Parameters结构体里的bppcount_pf_为传值状态,所以获取不到返回值。

测试发现这个bug在ue4.19和最新的4.21中都存在。 bug重现方法如下:

1.打开ue4.21编辑器,新建蓝图项目ThirdPerson模板并打开该项目。 2.在content下新建”蓝图函数宏库“并打开,新建测试函数Test3,添加返回值int型,并使其返回一个整数值(比如9).保存此函数库。图片1 alt text

3.打开ThirdPersonCharacter蓝图,在beginplay中增加调用蓝图库中的函数Test3,并printstring,完成后保存。图片2 alt text

4.将项目设置里的蓝图本地化方法改为exclusive,并设置ThirdPersonCharacter蓝图的nativization功能。 5.点击播放按钮,发现游戏运行后打印出值9。 6.打包本项目,运行后发现打印出值0。可见这个bug确实存在。

希望管理员能反馈一下这个bug,并期待能早点解决。

Product Version: UE 4.21
Tags:
捕获.png (38.4 kB)
捕获1.png (89.5 kB)
more ▼

asked Feb 04 '19 at 02:59 AM in Chinese

avatar image

ttaw
11 2 5

avatar image Feng.Li STAFF Feb 12 '19 at 09:20 AM

你好,我尝试重现了下这个步骤,发现没有问题。使用的是4.21.2,登录器更新的引擎版本。

avatar image ttaw Feb 13 '19 at 02:28 AM

我也是用的4.21.2,登陆器更新的引擎版本,发现打包develop模式和发行模式都有这个问题。我把工程文件传到百度云了,要不你下载下来看看? https://pan.baidu.com/s/1ilEYsPm2X_3ChRHk-zK2pQ

avatar image ttaw May 03 '19 at 03:10 AM

bug还存在。需要注意的是上面步骤里只打开了ThirdPersonCharacter的nativization功能,没有打开那个蓝图函数宏库的nativization功能,如果打开这个宏库的原生化就不会出现这个bug了。

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question