Assign C++ component value in blueprint?

Hi every body I have a C++ class which contains a pointlight as an pointer object, I want assign it’s value in blueprint, but it’s missing in blueprint, also I write EditAnywhere and BlueprintReadWrite, the code is in blow.

UCLASS()
class TESTCPPUE417_API AMyCube : public AActor
{
	GENERATED_BODY()
	
private:
	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AccessPrivate = "true"))
	float moveSpeed = 1.0f;

	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	float rotationSpeed = 1.0f;

	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	AActor *parent;

	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	float radius;

	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	FString parentObjectName;

	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	FString triggableActorName;

	UPROPERTY(EditAnywhere, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	USphereComponent *collider;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CustomProperty", meta = (AllowPrivateAccess = "true"))
	UPointLightComponent *pointLight;

	UFUNCTION()
	void OnTriggerEnter(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult);

	UFUNCTION()
	void OnTriggerExit(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);

	UFUNCTION()
	void debug(FString message);

	float d, teta, degree, x, y;

public:	
	// Sets default values for this actor's properties
	AMyCube();

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

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;
	//void OnHit(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
};

Use VisibleAnywhere, and you must click on the actual pointlight component to modify it

I don’t want to modify I want create a point light in Blueprint and assign it to UPointLightComponent *pointLight, In Custom property I missing pointLight

Use get component by class, cast it to the point light component and assign it to the variable. I dont think components can show up as a custom property.

that’s not good approach, imagine i have car and i used point light on car lights now I want to access point lights from code, the first way is to use find point light with iterator as I know but don’t want to use it I want to assign it but I don’t know how?

I know it but I want do this by assigning I want to know is there any way to do this, just for test purposes.

You can do it on beginplay or onconstruction and get a reference to it, that way you’ll always have it and dont need to do the iteration anymore

on your On Construction tab in the BP you can get your C++ var and assign it to the blueprint added component. I think if you make it EditAnywhere you’ll see it pop up in your property, but im not sure if you can still assign it to your BP created component.