zoukankan      html  css  js  c++  java
  • Missing '*' in Expected a pointer type

    Parsing headers for try001Editor
    2>           Running UnrealHeaderTool "F:space-12	ry001	ry001.uproject" "F:space-12	ry001IntermediateBuildWin64	ry001EditorDevelopment	ry001Editor.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);

    编译通过

  • 相关阅读:
    人生中最重要的三位老师
    自我介绍
    秋季学习总结
    第五周学习总结
    第四周总结
    第三周基础作业
    判断上三角矩阵
    第二周作业及编程总结
    求最大值及其下标
    查找整数
  • 原文地址:https://www.cnblogs.com/Again/p/6367014.html
Copyright © 2011-2022 走看看