UPROPERTY not showing up in my editor

I was following along with the course just fine right up until declaring the unlocking tag in the header, instead of manually typing a string in my ActorHasTag() function.

This is the current code I’m using to declare my variable.

private:

	UPROPERTY(EditAnywhere)
	FName AcceptableTag;

However, for me the it is not showing up as editable variable in the trigger component.

I have tried:

  • Restarting the editor
  • Refreshing the Visual Studio Code project
  • Generating Visual Studio Project files using File Explorer
  • Deleting and re-adding the trigger to my Blueprint or even adding it to a random Actor instead of a blueprint
  • Recompiled without using Live Coding, recompiled manually through Visual Studio Code
  • Assigning my variable a value in the header file

I have included my files for the trigger component here on github.

Does anyone know why it’s not working? I have spent 2 hours trying everything and scouring the internet for possible causes of this issue, yet I don’t seem to find an answer.

After a long while I have decided to do the following which fixed it:

  • Export my code to somewhere safe (I already had it on github).
  • Delete the entire class, clean my build manually via Visual Studio Code.
  • Make a new class called TriggerComponent (instead of Trigger, I have no clue if this was the issue).
  • Copy and paste the old code into the new class files and edit all the code to reference TriggerComponent instead of Trigger.

This has fixed it and all seems to be working now, but I have no clue why it didn’t work before.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms