2020-12-31_15:03:39
Sometimes the properties of a Component show up when the owning Actor is selected in the World Outliner. I'm trying to understand when this happen, and how to make it happen.
This shows the UStaticMeshComponent
properties in the Actor's Details Panel.
Header:
#pragma once
#include "GameFramework/Actor.h"
class UStaticMeshComponent;
UCLASS()
class AMyActor : public AActor
{
public:
GENERATED_BODY()
AMyActor();
UPROPERTY(VisibleAnywhere)
UStaticMeshComponent* Mesh;
}
Implementation:
#include "MyActor.h"
AMyActor::AMyActor()
{
Mesh = CreateDefaultSubobject(TEXT("MyMesh"));
SetRootComponent(Mesh);
}