If you create for example a Box Trigger, you can see a Billboard in the 3D Viewport of the Editor. This Billboard is a component, but it isn’t listed in the Component-List within the Detauks Panel of the Editor (see questionmark in the screenshot below).
I am able to create a billboard components, but they are always listed in the Component-List of the details panel.
How, can I make a Billboard Component not appear in the Components-List, to have the exact same behavior like for the Trigger-Box for my own classes:
The Billboard itself being visible in the 3D-Viewport of the Editor (see red arrow in the screenshot)
The Component not listed in the Component-List in the Details Panel of the Trigger-Actor (see red question mark in the screenshot)
Are you looking to make a Billboard on your component?
if so: base header
class MYGAME_API UMarkerComp : USceneComponent
{
GENERATED_BODY()
protected:
#if WITH_EDITOR
//A UBillboardComponent to hold Icon sprite
class UBillboardComponent* BillboardComponent;
//Sprite for the Billboard Component
class UTexture2D* SpriteTexture;
#endif
Implementing .cpp
// Sets default values
UAmmoMarker::UAmmoMarker(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
bWantsInitializeComponent = true;
PrimaryComponentTick.bCanEverTick = true;
#if WITH_EDITOR
// Structure to hold one-time initialization
struct FConstructorStatics
{
// A helper class object we use to find target UTexture2D object in resource package
ConstructorHelpers::FObjectFinder<UTexture2D> Texture0;
FConstructorStatics()
: Texture0(TEXT("Texture2D'/Game/MYGAME/Procedural/Blocks/Blueprints/icons/AmmoMarker'"))
{
}
};
static FConstructorStatics ConstructorStatics;
BillboardComponent = ObjectInitializer.CreateEditorOnlyDefaultSubobject<UBillboardComponent>(this, TEXT("Billboard"), true);
SpriteTexture = ConstructorStatics.Texture0.Object;
BillboardComponent->Sprite = SpriteTexture;
BillboardComponent->AttachTo(this);
#endif
}
This only works for me if playing in the editor though. If I run standalone game it crashes, so there is another piece to it to really work completely.
Thanks for your comment, I’ve edited the the question to make it more clear.
I am asking for a billboard component visible in the 3D-Viewport of the editor, while at the same time not being shown in the components-list of the respective actor.
If you don’t want to use code it doesn’t appear to be possible as of 4.9, but you can add a billboard component then find the default editor billboard and replace it with a transparent png. It’s quite a dirty work-around and I’m surprised it’s not yet a feature.