Hi,
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).
- Refresh/Re-compilation does not help.
- Re-opening of the Unreal Engine helps sometimes.
- Re-parenting helps sometimes.
- 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.
Thanks for your help!
class THEGAMEPROTOTYPE_API ATheCharacter : public ACharacter
{
// ...
private:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = true))
class UHealthComponent* Health = nullptr;
...
}
!edit:
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!