Hi I’m trying to make tile generator in unreal c++ project.
I want to make 2d array tile set and edit detail of tiles’s setting with blueprint so I wrote code like this
here is my code.
.h
USTRUCT(BlueprintType)
struct TileField
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
TArray<UStaticMashComponent*> Tiles;
};
UCLASS()
// ...
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
TArray<TileField> TileFields;
};
.cpp (in loop in constructor)
TileFields[i].Add(CreateDefaultSubobject<UStaticMeshComponent>(/*name*/)
TileFields[i].Tiles[j]->AttachTo(RootComponent);
TileFields[i].Tiles[j]->bEditableWhenInheried = true;
// set default transform and set default static mesh etc.
and I create blueprint class based on this c++ class.
now I can see my default static mesh components in blueprint editor but I still can’t edit individual tiles detail in blueprint editor.
simply I can’t see anything in detail panel
here is screenshot