Any values you want to be modifiable within the editor need both “EditAnywhere” and “BlueprintReadWrite” included in the UPROPERTY macro.
//within your struct definition:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SpawnPoint")
UMeshComponent* SpawnPreviewMesh;
//within your spawning actor/object .h
UPROPERTY(EditAnywhere, EditFixedSize, BlueprintReadWrite, Category = "Spawning|Preview")
TArray<FAISpawnPoints> SpawnPoints;
Also, if you want them to be editable outside of the Actor’s blueprint (i.e. within the Level blueprint) you need to make the properties public. If you want them editable only from inside the Actor’s blueprint make them protected. If they are private you can’t modify them within the blueprint editor at all.
The “PreviewComponent” is dynamically created in the code you show in your screenshot; that’s not going to be modifiable within the editor because it has no UPROPERTY macro.
Rather than declare a new variable immediately before populating it, you can include a UMeshComponent* property in your header and include the same EditAnywhere, BlueprintReadWrite statements in the UPROPERTY macro for it:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning|Preview")
UMeshComponent* PreviewComponent;
If you need to have multiple PreviewComponent values, place them in an array of their own:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning|Preview")
TArray<UMeshComponent*> PreviewComponents;
Then, add your preview components to the array after they’ve been spawned:
if (CDOSkeletalMesh)
{
USkeletalMeshComponent* PreviewSkeletalMeshComponent = NewObject<CDOSkeletalMesh>(this);
PreviewSkeletalMeshComponent ->SetSkeletalMesh(CDOSkeletalMesh);
PreviewComponents.Emplace(PreviewSkeletalMeshComponent );
}
else if (CDOStaticMesh)
{
UStaticMeshComponent* PreviewStaticMeshComponent = NewObject<CDOStaticMesh>(this);
PreviewStaticMeshComponent ->SetStaticMesh(CDOSkeletalMesh);
PreviewComponents.Emplace(PreviewStaticMeshComponent );
}
That should give you the ability to modify the values you’ve highlighted in the editor.
You also may want to change the BlueprintReadOnly value in the SpawnClass property of your USTRUCT to BlueprintReadWrite; allowing you to modify the spawning class in the editor as well.
But what you need to be able to modify in order to control which mesh is spawned are the CDOSkeletalMesh and CDOStaticMesh variables; these seem to be derived from “CDOMesh” - so it looks like if you want to be able to dictate which mesh is spawned in the editor, you’ll need to include a UPROPERTY macro for the CDOMesh value; unless the CDOMesh is derived from the SpawnClass or SpawnPreviewMesh defined in the spawn points; in which case making your array of spawn point BlueprintReadWrite should give you what you need.
But that’s just a guess from the screenshots you’ve shown. I’d have to see more of your code to better help if this doesn’t point you in the right direction.