USTRUCT variable invalid after editor restart / update: all c++ variables are broken after editor restart

Hi,
the following code is compiling without issues and I can create and use the Struct in a Bluperint without issues.
As soon as I restart the Editor I got an error message saying

The following member variables in blueprintPathhave invalid type. Would you like to remove them?

New Var 0

USTRUCT(BlueprintType)
struct FMotherLevelLayoutStruct
{
	GENERATED_BODY()


	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Struct")
		FString Name;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Struct")
		ALevelLayoutActor* Actor;



};

/edit
actually none of the c++ variables are valid after restarting the editor. If I compile the projects, the variables reappear

found a solution after wasting hours.

  1. Editor Preferences: Force Compilation atStartup
  2. delete all Intermediate and Binaries files
  3. restart and launcher rebuilds source
  4. UE Editor: Tools → Refresh Visual Studio Project
3 Likes