Why are Blueprint components not refreshed after code change?

Hi,

I have a Blueprint “parented” with a class.

Is it normal that when I add a components to the class using “PCIP.CreateDefaultSubobject”, I have to recreate my blueprint in order to see my newly created components in the Unreal Blueprint Editor ?

Because otherwise the components section of my blueprint does not display what I added.

I am new to UE so I may be missing something which is why I ask your help on this.

Thanks in advance.

Hi Py0_,

When you add the code to your class to include a new component, are you building the project in Visual Studio then going back into the Editor to check your Blueprint? I tried to reproduce this a few times and did not see what you described.

Also, what version of the Editor are you using, and are you using a version built from Source, or a binary version from the Launcher?

Hi,
I am working with the source code from git which should be the last out (version 4.2.0) and am of course compiling my game project source code with the editor closed. I even went to recompile everything in case something was odd but still no change in my blueprint in the editor.

I will try to create a new project to see if I can recreate the issue from scratch but I do have little hope.

If that helps, I am using windows 8.1 with visual studio ultimate 2013 and, again, UE 4.2 from github

Thanks for your time !

** EDIT:

So I went ahead and created a project right after posting my comment and got the exact same undesired behavior.

I used this tutorial, copy pasted both .h and .cpp and compiled. I then launched the Editor, created a blueprint as refered in the previous link and saved it. I finally went back to VS, added those lines :

// .h
	/** sphere component */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Switch Components")
		TSubobjectPtr<USphereComponent> Sphere2;

// .cpp constructor

	Sphere2 = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("Sphere2"));
	Sphere2->InitSphereRadius(250.0f);
	Sphere2->AttachParent = RootComponent;

Compiled the project abd finally relauched the Editor and there were no shpere2 in the blueprint components.

** EDIT2: Creating a second blueprint having the same parrent does show sphere2 which make me beleive that the code is correct.

Hi Py0_,

I used your details to do some more testing and was able to see the behavior that you described. I checked with some of our Developers, and they have actually been working on this issue, and a fix has been added to the Master branch on GitHub. You can download that fix and merge it into your current Engine build, if you want.

Thank you very much, I am gonna pull the source code and let you know if the issue still persists.

Sorry for the long wait, I had a lot of work which unfortunatly does not involve UE.

It seems I do not succeed in compiling the master branch. Here is what I get :

  • 2> -------- End Detailed Actions Stats ----------------------------------------------------------
  • 2>ERROR : UBT error : Failed to produce item: D:\Mes documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UnrealHeaderTool-Core.dll
  • 2> Cumulative action seconds (8 processors): 0.00 building projects, 115.48 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
  • 2> UBT execution time: 36.31 seconds
  • 2> UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Win64, module info: D:\Mes documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UnrealHeaderTool.manifest).
  • 2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(43,5): error MSB3073: The command “…..\Build\BatchFiles\Rebuild.bat UE4Editor Win64 Development” exited with code 2.
  • ========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

PS: I can’t seem to find how to do simple ‘\n’ here.

Hi Py0_,

Sorry for the delayed response, I was out of the office for a few days.

Did you sync up to the Master branch, or did you pull down only the updated files and merge them into your existing branch?

Hi,

I cloned the depot as new, checked out to master branch, unziped the 2 required files and relaunched the batch script and compilation still managed to fail.

If I did something wrong or there is anything I can do to give out more informations about the compilation failure, please tell me. I will try to compile UE on a different machine and see if it is my computer that is missing anything.

Hi Py0_,

The Master branch is the “bleeding edge” of the Engine development. Updates and fixes are added into it as they are completed and the Engine as a whole may not have been fully tested with the updates in place. As a result, it can be potentially unstable, may not build at all, and is essentially a “use at your own risk” version of the Engine.

What you would typically want to do if a fix to an issue you are experiencing has been added to the Master branch, is to just pull down that fix, then merge that into the stable version of the Engine that you are using to see if the fix corrects the issue for you.

Using the Master branch for project development may not be ideal. However, if you want to be able to experiment with fixes, updates, and new features before they go live, that is where you would want to go.

I see, i believe I don’t need anymore help from you then. I am gonna play with the source code or simply try developing using only the blueprint editor until a new update of the 4.2 branch gets public.

I thank you for your time and wish you developers good luck for the following updates.

Until I need anymore help,
Py0_