T
T
thenull32022-01-29 15:37:55
unreal engine
thenull3, 2022-01-29 15:37:55

How to include (add) a Blueprint component to a c++ actor?

There is a Blueprint component "FlatComponent" created on ActorComponent, it needs to be somehow added to the c ++ actor, which is called "FlatActor".

The question is how to do it?

I tried to add this to FlatActor.h:

UPROPERTY(VisibleAnywhere)
TSubclassOf<class UActorComponent> FlatCompClass;

UPROPERTY()
UActorComponent* FlatComp;


But then I don't know what to do with it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question