Inherited UActorComponent sometimes not accessible from other Blueprint


I have a UHealthComponent : public UActorComponent attached to ATheCharacter : public ACharacter in it’s C+±Contructor (inherited in derived Blueprint). Now I’d like to access the component from ist AnimBP-EventGraph.

After compilation, seemingly by chance, It flags the node in the AnimBP with an error. When I delete the nodes and try to add them again, they just don’t show up in the searchbar at all (the red highlighted in the screenshot does not show up).

  1. Refresh/Re-compilation does not help.
  2. Re-opening of the Unreal Engine helps sometimes.
  3. Re-parenting helps sometimes.
  4. Closing, cleaning-up intermediates and re-building the whole projects seems to help.

All this never happened to me, if I don’t attach the component in C++ but in the Blueprint. Does anyone else experience this bug and knows a (quicker) fix)? This is super time consuming because it happens very often. :confused:

Thanks for your help!

class THEGAMEPROTOTYPE_API ATheCharacter : public ACharacter
// ...
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = true))
	class UHealthComponent* Health = nullptr;

I just realized that in the ATheCharacter Blueprint trying to drag & drop the Component onto the Eventgraph canvas it shows (whilst dragging) the message: “actor component cannot find corresponding variable”. I closed and opened the Editor, now it works again. This is so annoying!

I don’t know a solution unfortunately, but I’m running into this as well.

I did find a similar post in the forums from 2015 about this.