Sorry if this is the result of a misunderstanding of the documentation, but I’m having a hard time deciphering some of the behavior I am seeing with regards to UPROPERTY. Basically I am seeing an inconsistency in what is showing up in the editor. In one of the tutorials I did one of the steps was to tag a UStaticMeshComponent as a property that can be set like so (this is in an ACharacter subclass):
/** Pawn mesh: 1st person view (arms; seen only by self) */
UPROPERTY(VisibleDefaultsOnly, Category = Mesh)
// Generally there is a third and first person mesh in FPS games
USkeletalMeshComponent* FirstPersonMesh;
Now I’m trying to do something similar when modifying the projectile class of the FPS sample project. I want to be able to specify the mesh for the projectile and a particle system that I’m going to use to make a rudimentary tail in the editor. If I specify it like so
UPROPERTY(VisibleDefaultsOnly, Category = Tail)
class UParticleSystem* Tail;
UPROPERTY(VisibleDefaultsOnly, Category = Mesh)
class UStaticMesh* Visual;
The properties show up in the editor, but if I use the components version (i.e. UStaticMeshComponent) they don’t. This class is a subclass of AActor if that is relevant.
Is this behavior expected? Is there a reason for it? I’m also open to suggestions for better ways to do what I’m trying to do if anyone is feeling so kind :).