I didn’t, but it happens with any component I create. I tried to create 4 different components in 3 different projects.
I have a component derived from Point Light Component. Also, there is one property that I added. I can put it into blueprint as a component and this object in the scene works fine.
Point is that when I change any component value in the blueprint asset and restart editor or recompile the project all properties reset.
Here is my .h component code:
#include "CoreMinimal.h"
#include "Components/PointLightComponent.h"
#include "MyActorComponent.generated.h"
UCLASS(Blueprintable, ClassGroup = Lights, hidecategories = Object, editinlinenew, meta = (BlueprintSpawnableComponent))
class COOLSHOOTER_API UMyActorComponent : public UPointLightComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UMyActorComponent();
UPROPERTY(EditAnywhere, Blueprintable)
int integer;
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
};
There is nothing in ccp, so I don’t post it.
As a result, I want to be able to set default values for a component inside blueprint;
Did you try to recreate the component,
I had a similar problem and the only thing that fixed it was
deleting the component
adding it again
save.