# Editor not showing new variables after compilating

**URL:** <https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482>\
**Category:** Blueprint\
**Tags:** compilation, unreal-engine, editor, question, Blueprint, CPP\
**Created:** [August 27, 2019, 1:47pm UTC](https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482 "2019-08-27T13:47:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akaPrometh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akaPrometh](https://forums.unrealengine.com/u/akaPrometh)\
**Post date:** [August 27, 2019, 1:47pm UTC](https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482/1 "2019-08-27T13:47:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Orfeas\_El](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Orfeas\_El](https://forums.unrealengine.com/u/Orfeas_El)\
**Post date:** [August 27, 2019, 3:59pm UTC](https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482/2 "2019-08-27T15:59:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![akaPrometh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akaPrometh](https://forums.unrealengine.com/u/akaPrometh)\
**Post date:** [August 28, 2019, 12:13pm UTC](https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482/3 "2019-08-28T12:13:44Z")

</div>

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;
};
```

---

<div class="post-metadata">

**Author:** ![Orfeas\_El](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Orfeas\_El](https://forums.unrealengine.com/u/Orfeas_El)\
**Post date:** [August 28, 2019, 12:25pm UTC](https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482/4 "2019-08-28T12:25:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![akaPrometh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akaPrometh](https://forums.unrealengine.com/u/akaPrometh)\
**Post date:** [August 28, 2019, 2:30pm UTC](https://forums.unrealengine.com/t/editor-not-showing-new-variables-after-compilating/454482/5 "2019-08-28T14:30:55Z")

</div>

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/
