Why is my UPROPERTY variable not updating in-game even though it compiles fine in C++?

I’m experimenting with extending functionality in C++ rather than just Blueprints. I declared a UPROPERTY(EditAnywhere) variable, but it doesn’t seem to reflect changes I make in the editor at runtime. I’ve checked my constructor and initialization order but still no luck. Could someone explain the lifecycle of a UPROPERTY and when it actually updates in game?

Hard to guess, short answer is shouln’t be.Can you paste part of your code?

What class you extending and what is the UProperty varaible, and are you declaring a default variable somewhere in your code?

I’m coding UE5/C++ and say for an actor or pawn I have UPROPERTY(EditAnywhere ) variables as private

But obviously this is for the editor and not a build outside of the editor

In the editor you have to drop the actor into the level and there you can change the values in the panel

Could be that, if the class not the instance being edited.

@JaninDerner

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "TestActor.generated.h"

UCLASS()
class TPSCUSTOMENGINE_API ATestActor : public AActor
{
	GENERATED_BODY()

public:
	ATestActor();

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float Speed = 100.0f;


protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;
};

do like this or as said place in level as instance and edit. Otherwise class default will be used from spawn.