DefaultToInstanced - EditInlineNew class / Instanced - EditAnywhere property : edits don't work

Hello,

I had to implement some states for my character, and I did the same guys working on Unreal Tournament did for the weapon states.

I have a state class hierarchy, and the base class has the following attributes:

UCLASS( Abstract, DefaultToInstanced, EditInlineNew, Within = BBCharacter )
class UBBCharacterState : public UObject

I have several states inheriting from this base class.

I declare them in my character class like this:

UPROPERTY( Instanced, EditAnywhere, Category = "States" )
class UBBCharacterStateMoving * MovingState;

UPROPERTY( Instanced, EditAnywhere, Category = "States" )
class UBBCharacterStateJumping * JumpingState;

And instantiate them like that:

MovingState = PCIP.CreateDefaultSubobject< UBBCharacterStateMoving >( this, TEXT( "StateMoving" ) );
JumpingState = PCIP.CreateDefaultSubobject< UBBCharacterStateJumping >( this, TEXT( "StateJumping" ) );

I have declared some properties on the jumping state which I would like to edit in the editor:

UCLASS()
class UBBCharacterStateMoving : public UBBCharacterStateNoBall
{
    GENERATED_BODY()

public:

    UBBCharacterStateMoving();

    UPROPERTY( EditAnywhere, Category = "ActionTrigger" )
    float ActionTriggerMinimalDotProduct;
};

Everything works fine, except that when I update in the editor the value of ActionTriggerMinimalDotProduct, it keeps its default value I have set in the constructor of the class.

What are the magic keywords I should use to get this working?

Thanks!

As I did not find any solution to my problem (and maybe it’s not a problem, and instanced properties are supposed to behave like that), I created a DataAsset class to hold the various state properties. This way, I can update the values dynamically in the editor, and it is reflected in the game

We hope this Blueprint Class “EditInlinenNew” plugin (which no longer requires any C++ to use the EditInlinenNew feature) will help you. :large_blue_diamond: