With blueprints i have been able to add meshes to an actor with blueprints that are visible directly in the level editor.
When i do the same in C++ the mesh will only become visible when i start the game, which is not so practical…
Is it possible to write a C++ class that can be used directly in the level editor without having to create a BP class based on the C++ class?
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh") UStaticMesh* mesh;
UStaticMeshComponent* meshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh")); meshComponent->SetStaticMesh(mesh); RootComponent = meshComponent;