这样注释可以在actor 细节面板上,通过鼠标悬停看到变量说明
/*
is super man
*/
UPROPERTY(EditAnywhere,Category="Collectable")
bool bIsSuper;
UPROPERTY(VisibleAnywhere,Category="Collectable") 显示在编辑器上面, Category="Collectable" 属于分类 “xx|xx|xx”
UStaticMeshComponent* CollectableMesh; 定义静态网格组件
UPROPERTY(VisibleAnywhere,Category="Collectable")
USphereComponent* BaseCollisionComponent; 需要#include "Components/ShereComponent"
PrimaryActorTick.bCanEverTick = false; 默认上true 如果当前actor 不需要tick 可以关闭。节约性能