Position/Rotation not available in Actor viewport

For some reason I’m not able to change the position/rotation of my actor component (made in C++) in the actor viewport. It’s not available in details panel, but scale is (see image below). Even if I try to drag it around in the viewport, it will not allow me.



It only happens after I compile the code. I can delete the actor component from the components list and re-add it, then I have my position and rotation back. But, compile again (without changing any code) and it removes the position/rotation again.

Is this a known bug? Is there a work-around?

EDIT: It appears to bring back the Position/Rotation when you restart the UE5 editor as well.

Can you show the C++ declaration of your actor component:

class UMyActorComponent : ??? {

(In particular are you deriving from UActorComponent, USceneComponent or UPrimitiveComponent?)

Also have you tried with a different actor component? Like another StaticMesh or whatever, and see if you observe same behaviour just to confirm it is something wrong with your actor component.

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class SIMTOOLS_API UMyTestComponent : public UWidgetComponent

I tried to test your suggestion, but suddenly it’s not an issue anymore. Whether it’s under StaticMesh or DefaultSceneRoot. Previously, when I would compile, the viewport would refresh. Now it’s not doing a refresh. I’m not sure what I have done different. I’ve only added code to the CPP for managing widgets.

I’ve run into this issue before when playing around with a USkeletonComponent in C++.

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class SIMTOOLS_API UMyTestComponent : public UWidgetComponent


	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;


	void BeginPlay() override;
	void OnRegister() override;

	// Blueprint Properties
	// The class of User Widget to create and display an instance of
	TSubclassOf<UUserWidget> TargetWidgetClass;
	// The desired screen size (in centimers) in 3D space
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FVector2D DesiredSize = { 16.0f, 16.0f };
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool MaintainAspectRatio = true;


	void initDisplay();

Sorry, are you saying that the problem has gone away? Or do you still have a problem?

It seems to have resolved itself for the time being. I can’t make it happen again.