Hi There!!
In this lecture, we discuss access modifiers. Access modifiers are modifiers or property specifiers in the documentation. Access modifiers are used to declare whether we can, edit, just see, or see and edit. Right? Just correct me if I go wrong.
VS Code C file-
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Comomponents", meta = (AllowPrivateAccess = "true"))
UCapsuleComponent* CapsuleComp; // Simple collision for the base mesh( base mesh = the base of the tank that the player controls)
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Comomponents", meta = (AllowPrivateAccess = "true"))
UStaticMeshComponent* BaseMesh; // Base mesh is gonna be static, so this component keep it static here
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Comomponents", meta = (AllowPrivateAccess = "true"))
UStaticMeshComponent* TurretMesh; // Staticmesh component for the shooting turret above the base mesh
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Comomponents", meta = (AllowPrivateAccess = "true"))
USceneComponent* ProjectileSpawnPoint; // missile launched from the turret mesh
This’ll allow our properties to be viewed anywhere, and view in blueprint too. there are many more specifiers that go with UPROPERTY(), you can find them all in the documentation -
UE Editor-
We have our pawn visually represented in here.
This is our static mesh, the turret above the tank(base mesh).
This is the base mesh, the tank.
Here is our scene component, our missile that shoots from the turret.
This is our enemy pawn turret here. The Base Mesh is SM_TowerBase, the static mesh is SM_TowerTurret, and the scene component is the missile.
Previous toon tanks post: Deriving blueprint classes in toon tanks - #3 by TP_MakeGames
Thanks for reading,
Good BYE!!