首页 > 其他 > 详细

Missing '*' in Expected a pointer type

时间:2017-02-05 11:03:31      阅读:414      评论:0      收藏:0      [点我收藏+]

 

Parsing headers for try001Editor
2>           Running UnrealHeaderTool "F:\space-12\try001\try001.uproject" "F:\space-12\try001\Intermediate\Build\Win64\try001Editor\Development\try001Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
2>         F:/space-12/try001/Plugins/ImageLoader/Source/ImageLoader/Classes/ImageLoaderComponent.h(20) : Missing * in Expected a pointer type

在定义下述函数的时候产生了上述错误

        UFUNCTION(BlueprintCallable, Category = "HongGuang|ImageLoaderComponent")
        static void LoadImage(FString filepath, UTexture2D& _image);

原因是蓝图不能定义引用类型

如果要返回这个对象,那么我们可以采用返回指针的方式

        UFUNCTION(BlueprintCallable, Category = "HongGuang|ImageLoaderComponent")
        static UTexture2D* LoadImage(FString filepath);

编译通过

 

Missing '*' in Expected a pointer type

原文:http://www.cnblogs.com/Again/p/6367014.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!