zoukankan      html  css  js  c++  java
  • GENERATED_UCLASS_BODY 和 GENERATED_BODY 区别

    the GENERATED_BODY() macro allows the class to build without having a constructor defined. If you need a constructor, you can change that macro to the more familiar GENERATED_UCLASS_BODY(). If you do, you must provide a constructor for the class or you will not be able to build the project in Visual Studio. So your code will look something like this:

     

    GENERATED_BODY()  宏允许类没有构造函数,如果你需要一个构造函数,你可以使用GENERATED_UCLASS_BODY(),当你这样做了,你就必须定义一个构造函数,否则无法编译成功。

    红色都都是错误的,根据2014年论坛上Unreal员工的新回复(https://forums.unrealengine.com/showthread.php?52236-4-6-constructor-changes-am-confused),

    GENERATED_UCLASS_BODY已经毫无用处,在需要构造函数的情况下,也应该使用GENERATED_BODY();

    但GENERATED_BODY似乎并没有public修饰符,所以需要手动添加

  • 相关阅读:
    1,JAVA图形
    作业(2)
    作业(1)
    作业
    2.15 (第二次作业)
    60页2.6 (第二次作业)
    1.12 (第一次作业)
    27页1.8(第一次作业)
    26页1.3(第一次作业)
    作业第六次
  • 原文地址:https://www.cnblogs.com/heben/p/5495280.html
Copyright © 2011-2022 走看看