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);

    编译通过

  • 相关阅读:
    053403
    053402
    053401
    053400
    053399
    053398
    053397
    053396
    053395
    第k小数
  • 原文地址:https://www.cnblogs.com/Again/p/6367014.html
Copyright © 2011-2022 走看看