C++ Changes no longer reflected in Blueprints

Greetings!

This only started happening with 4.15. Since 4.8, I have not really had any issues making C++ variables available in blueprints. I have a structure along the lines of:

USTRUCT(BlueprintType)
struct BLAH_API FHappyStruct
{

	UPROPERTY(EditAnywhere, BlueprintReadOnly)
	int32 someVariable;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Points")
	int32 rankingPoints;

};

Pretty simple. When I go to Blueprints and break this structure apart, I can see pins for someVariable and rankingPoints just fine. Now, let’s say I add:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Points")
int32 rankingPoints2;

I then compile the Engine or in VC++ with 0 errors. I would expect “rankingPoints2” to also be available as a pin, especially after closing and reopening the editor, but it is not.

So then I DELETE the following from the code:

UPROPERTY(EditAnywhere, BlueprintReadOnly)
int32 someVariable;

I compile in either the engine or VC++ without error. In blueprints, I break apart this struct and “someVariable” is still there. In fact, any changes that I make in C++ have no impact upon the Blueprints break. A variable changed to UPROPERTY() will still appear in blueprints. Changing categories for variables is not reflected. Changing different objects and structures has the same effect.

I’ve tried breaking apart the variable in a separate blueprint and the same thing occurs. Changes in C++ are no longer being reflected in blueprints. I’ve tried recompiling, rebuilding the solution in VC++ and pretty much everything else. The only thing that really changed in 4.15 for me was that I nativized the blueprint in question.

I am not sure what the issue is. There are 0 compilation errors in C++ and no errors in Unreal. There are no errors in the blueprints. It seems like the Editor is relying upon some cached variable that is no longer updating when the code is compiled.

Any help would be appreciated, thank you.

Some changes in the code cannot be hot-reloaded into the editor. I usually restart the editor when this happens, and in most cases you’d get a “hot-reload failed” messages or something.
Does restarting the editor fix this?

Hi. Thank you for the response! Closing and re-opening the editor has no effect.

Reposted to C++ section as this does not appear to be related only to blueprints.

No C++ changes are taking effect after a successful compile.

Alright, solved the issue. In order to work on another bug, I deleted the files from \Binaries\Win64 which, in general, isn’t a problem. BUT, I had created a folder named Test in the \Binaries\Win64 directory and copied the old files into it, as a precaution. The Editor was basically doing a recursive search through the \Binaries\Win64 directory, hit the Test folder and was using the old version of UE4Editor-[name].dll found within.

Completely clearing out the binary folder fixed the issue!

Hey irdc-

I noticed the struct node not updating after a hot reload however it would update with the added/removed properties after restarting the project. Another issue that I noticed was the struct node breaking if the blueprint was saved after making the change to the struct in code. This has been reported for investigation here: Unreal Engine Issues and Bug Tracker (UE-43838) .

Cheers

Hey ! Thanks for the response.

Yep, looks like is what happened with my initial bug that set this problem in motion. I’ll be sure to save my blueprints before compiling in the future.

Thanks!

please, add affected version 4.20 too