Problems with new components, Compiling but no changes. (UHT / UBT Bug?)

Hello am trying to add a audio component to my Character/ Player class.
But am having some issues when i compile the changes are not made to my project.

I added a component like so.

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Current Footstep Sound")
		TSubobjectPtr<class UAudioComponent> AudioFootstepComp;

And in my constructor i have,

	AudioFootstepComp = PCIP.CreateDefaultSubobject<class UAudioComponent>(this, TEXT("Footsteps Sound"));
	if (AudioFootstepComp)
		AudioFootstepComp->AttachParent = Mesh;
		AudioFootstepComp->bAutoActivate = false; // with this true the sounds play at spawn (game starts)
		AudioFootstepComp->bStopWhenOwnerDestroyed = true;

This code did work and i have used the same approach before in a different class as well.
But i updated the Category for the property and now i can`t edit it in the Editor.
But the name/ category don’t get updated in the editor.

Tried Generating Project Files, Compiling in Editor, I have run Clean, and Rebuild.
Did some searching and seem some other people have/had the same issue any tips on how to fix this?

Dear WCode,

Two major things to check out :slight_smile:

  1. You are still compiling Development Editor 64 ? I used to mess that up a lot and then wonder why editor was not updating

  2. If #1,

then try this!

AudioFootstepComp = PCIP.CreateDefaultSubobject<class UAudioComponent>(this, TEXT("Footsteps Sound"));

Use a new component name

AudioFootstepComp = PCIP.CreateDefaultSubobject<class UAudioComponent>(this, TEXT("Totally New and Happy Footsteps Sound"));

Then go in the editor

and Recompile the class even if the Checkmark is green

Some combination of the above should get you rolling :slight_smile:


Sometimes changing the component name enables it to appear, if it wasn't before / had a conflict with earlier code versions, 

and you have to recompile class in the editor even if it is check mark green, when adding components from CPP.


PS: Based on your description of modifying an already existing CPP component I am inclined to think that changing the actual component name in the CPP is most likely to work, and then recompiling editor even if it is checkmark green

Hello Rama yes it is compiling for x64.

1>------ Rebuild All started: Project: MyProject, Configuration: Development_Editor x64 ------

Also i changed both the Category and Component name, and removed code and re typed it after compiling.

Also upped the privleges to both Visual Studio, and the editor (no change.).
Made sure i have no vierd Read Only privleges on my project folders.
And re-installed the version 4.2.1 am working on.

Am out of ideas right now the project is not updating to reflect new code.

Have you tried doing something really simple unrelated to all these component issues, putting a UE_LOG in a postinit components or begin play somewheres, or on a key press,

to see if ANY code is updating for your project?

That would go a long way toward simplifying this debugging process.


Yes e.g: adding a Debug message to BeginPlay() in my character class will get displayed when added its just the component it seems.

Is there some way i can “force” Unreal Header Tool to generate the header files?
Edit: I know they should get created when i compile but am suspecting they are not.

Solved it by changing the name of the property so for now it works. :slight_smile:
Thanks you for the assistance Rama.