Unreal学习开发(一)
Actor
An Actor is any object that can be placed into a level, such as a Camera, static mesh, or player start location. Actors support 3D transformations such as translation, rotation, and scaling. They can be created (spawned) and destroyed through gameplay code (C++ or Blueprints).
In C++, AActor
is the base class of all Actors
Each actor has a instigator, in new version it is private so ues GetInstigator() to get it .
Delegates
Data types that reference and execute member functions on C++ Objects.
Single
Dynamic (UObject, serializable)
Notes: Function should be tag as UFUNCTION()
Pawn
Pawn是可作为世界场景中”代理”的Actor。Pawn可被控制器所有,
- AAIController
Character
PlayerInputComponent
Character basic control animation
Controller
- AController
- PlayerController
- AAIController
Weapon class
Add damage to a target dummy
TSubclassOf
1
2
3/** type of damage */
UPROPERTY(EditDefaultsOnly, Category=Damage)
TSubclassOf<UDamageType> DamageType;Let designer choose demage type.
Spawn an actor in world.
1 | GetWorld()->SpawnActor<AActor>(ProjectileClass); |
Weapon to Character need to set owner.
TPSCamera
1 | CameraComp->SetFieldOfView(FOV); |
terminology
OKR: Objective and key results
Muzzle: 枪口
Replicated:同步给服务端
定义component 起始字母为U(Uobject),Actor 为A(Actor)
Black Magic
UE_4.26\Engine\Binaries\Win64 下UnrealHeaderTool.target
TypeName 行尾加一个空格。
可以加快编译速度。
UE4 定义属性修饰符总结
UE4C++定义属性修饰符总结 - 烤肉酱 - 博客园 (cnblogs.com)