新建组件:继承自UActorComponent
启动时调用BeginPlay
每帧调用 TickComponent
新建组件:继承自UActorComponent
启动时调用BeginPlay
每帧调用 TickComponent
添加组件---新建C++组件...
Add Component---New C++ Component
Inherited 继承
选择父类---Actor Component
新建C++组件:
Actor Component
Scene Component
Static Mesh Component
Skeletal Mesh Component
Camera Component
Directional Light Component
内容浏览器---C++类
Visual Studio解决方案管理器
Engine 提供需要的类
Game 我们后续的代码
Game--引用,添加引用,UE4,代码引用类,报错,试一试引用UE4
红色大写的词,都是 宏(#define)
pubic 公开的
protected 保护的
UOpenDoor::UOpenDoor() 构造方法
BeginPlay() 当游戏运行的时候调用的
TickComponent() 每一帧都会调用的
OpenDoor.cpp 中对BeginPlay() 和 TickComponent() 进行了重写
先调用构造函数,再调用Begin
TickComponent 每帧调用
UnrealEngineProjectGameModeBase 跟游戏发布的一些设置有关的