Another way to help on UPROPERTY

I am not sure what I will talk. But I imagine that another reason to the constant crashes would be the declaration of UPROPERTY.

private:
	UPROPERTY(VisibleAnywhere)
	USceneComponent* Root;
	
	UPROPERTY(EditAnywhere)
	UWidgetComponent* PaintingGrid;

	UPROPERTY(EditAnywhere)
	UWidgetComponent* ActionBar;

I am not sure, but I believe to change the UPROPERTY from VisibleAnywhere to EditAnywhere, despite being heavier, would be better to access and modify it.

VisibleAnywhere is used because if it is EditAnywhere, the reference can be changed, whereas VisibleAnywhere only allows the properties to be edited of the items.

It’s not heavier by any means - the objects are still the same but only in the editor it can be swapped out and this may be undesirable. This shouldn’t actually cause a crash either given they are initialised in the same way, unless of course there is an issue with the code.

If you are having editor crashes, it is unlikely this is the cause.

Privacy & Terms