Editor not showing new variables after compilating

Right, so another unreal issue… ^^

Ranting aside; the latest version of the engine seems to not want to show variables I create in cpp code in the blueprint’s Details pannel. I have to close the entire program and reopen the project for the changes to update.

For example, inside InteractableObject.h I have this structure:

USTRUCT(BlueprintType)
struct FInteractableConfig
{
	GENERATED_BODY();

public:

	FInteractableConfig() {
		HoldMethod = EHoldMethod::ClickOnce;
		SnapMethod = EGrabSnap::Free;
		GrabSnapHandPositionOffset = FVector();
	}

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
		EHoldMethod HoldMethod;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
		EGrabSnap SnapMethod;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
		FVector GrabSnapHandPositionOffset;
	
};

InteractableObject.h :

... FInteractableConfig define here ...

UCLASS()
class PROJECT_API AInteractableObject : public AStaticMeshActor
{
	GENERATED_BODY()
...	

protected:
	// ----------------------- Properties -------------- \\

	// 
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InteractableObject")
		FInteractableConfig Config;

...

When I added ‘SnapMethod’ the field wouldnt show in the blueprint’s view. I had to close/reopen the project for it to appear. I couldnt even access it via a break on the structure.
Same happened later when I added ‘GrabSnapHandPositionOffset’.

Perhaps theres something I’m not doing correctly, but I cant figure out since the logic workflow seems pretty obvious : write code, compile, edit stuff in the blueprints.

Any help is greatly appreciated, thanks <3

Try the following code:

 USTRUCT(BlueprintType)
 struct FInteractableConfig : public FTableRowBase
 {
     GENERATED_USTRUCT_BODY()
 
 public:
 
     FInteractableConfig() {
         HoldMethod = EHoldMethod::ClickOnce;
         SnapMethod = EGrabSnap::Free;
         GrabSnapHandPositionOffset = FVector();
     }
 
     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
         EHoldMethod HoldMethod;
 
     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
         EGrabSnap SnapMethod;
 
     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
         FVector GrabSnapHandPositionOffset;
     
 };

You didn’t inherit the FTableRowBase and you used a UCLASS body macro instead of the USTRUCT one.

Hi Orfeas, thank-you for your help! <3

I applied the fixes you suggest and they fixed the serialization issue I had, but not the initial problem. I still need to fully close/ reopen the project for new variables to show.

#include "Engine/DataTable.h"

At least now, the changes I make to the struct in the Blueprint are saved when I close/reopen Unreal4 :")

On the side note; I remade the entire project with 4.22 and made InteractableObject inherit from UStaticMeshComponent.
It now looks like this:

USTRUCT(BlueprintType)
struct FInteractableConfig : public FTableRowBase
{
	GENERATED_USTRUCT_BODY();

public:
       ... STUFF...
       Example variable;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
		EHoldMethod HoldMethod;
}

/**
 * 
 */
UCLASS(ClassGroup = ("VR"), meta = (BlueprintSpawnableComponent))
class VRPLAYGROUND_API UInteractableObject : public UStaticMeshComponent
{
	GENERATED_BODY()

public:
	// ----------------------- Properties -------------- \\

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InteractableObject")
		FInteractableConfig Config;
};

Is the above code located inside a plugin or inside your project’s source code? Have you tried deleting the binaries and intermediate folders and rebuilding your project?

Inside my project’s source code.
“PROJECT\Source\PROJECT\VR\InteractableObject”. I used the “New c++ Class” button within Unreal4.

I made a new clean project, this didnt fix it.
Then I deleted the binaries & intermediate folders (of this new project), still didnt fix it.

Editing my previous answer : the serialization issue is still here, it didnt go.
Any time I add/remove or edit the type of a variable in the structure, it resets the value of all the variables of the struct, everywhere in my project, the ones I did not change included. This only shows after closing/reopening the project \o/