"Editing a Value in a Class Default Object is not allowed"

Hi, I´ve been taking the course “Unreal Engine 4 Mastery: Create Multiplayer Games with C++” from Udemy and I am currently trying to add an effect component to an object when I colide with it. I follwed the video tutorial and after adding the “Effect” parameter to the blueprint I get the following message when trying to edit the aprameter.

I´ve checked and I do not think there is anything wrong with my code as I´ve followed step by step the tutorial. This is my code:

I´ve restarted Unreal, Recompiled the code. Compiled the Blueprint and still have no succes on being able to edit the effect parameter. Any help given will be of great help! Thanks.

The VisibleAnywhere UPROPERTY specifier just allows you to see the value of the variable in blueprints.
To actually being able to edit the value you should use one of this specifiers:

  • EditDefaultsOnly: Lets you edit the default value
  • EditInstanceOnly: Lets you edit the value of an instance of that class
  • EditAnywhere: Lets you edit both the default value and the instance value

Replace VisibleAnywhere with one of those specifiers and you’re set.

Cheers!

3 Likes

Worked as a charm! Thanks so much for helping me!