Scene Component - Unable to reposition

Hello all!

I’m following the ToonTanks tutorial and I’m in a bit stumped at the moment. I can’t reposition the Projectile Spawn Point USceneComponent in the editor. No transform shows up and the details pane stays empty. Relevant code is as follows for BasePawn.h:

private:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pawn Construction", meta = (AllowPrivateAccess = "true"))
	class UCapsuleComponent* CapsuleComp;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pawn Construction", meta = (AllowPrivateAccess = "true"))
	class UStaticMeshComponent* BaseMesh;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pawn Construction", meta = (AllowPrivateAccess = "true"))
	class UStaticMeshComponent* TurretMesh;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pawn Construction", meta = (AllowPrivateAccess = "true"))
	class USceneComponent* ProjectileSpawnPoint;

Almost exact as in the course, just preferred to do forward declarations and a different category name.

And of course the CPP side of things:

ProjectileSpawnPoint = CreateDefaultSubobject<USceneComponent>(TEXT("Spawn Point"));
ProjectileSpawnPoint->SetupAttachment(TurretMesh);

This is exact as in the example. TurretMesh is correctly declared and the hierarchy shows up correctly in the editor.

Yet when I click the Projectile Spawn Point no transform shows up in the editor and the details pain remains unpopulated. Pic of the situation on the editor side of things:

Is there something I am missing or something that has changed in Unreal that needs to be addressed? I’ve gone back over the lessons but can’t find any steps I’ve might have inadvertedly skipped.

I’ve already attempted to close Unreal, build in the IDE, open Unreal again, but no cigar. I’m using Unreal 5.0.2 if that makes any difference.

Thanks in advance for any help!

Found the culprit. This is a bug that’s existed since 4.0, still unfixed in 5.0.2, as it is apparently by design.

Long story short, it has to do with child blueprint classes “baking” features from parent C++ classes at the moment of their inception that then fail to update on subsequent compilations. The effects are what I described. Components and details of a child blueprint are not exposed in the editor despite having the correct UPROPERTY arguments.

Several options are offered as workarounds but the safest and cleanest one seems to be creating the blueprint child classes after finishing the components included in the constructor (which seem particularly sensitive to this according to other people reporting this issue).

For educational purposes this is obviously not convenient during the tutorial, as it is a good demonstration of the effects is the different arguments for UPROPERTY(). But I’m adding this response here so that people are aware and can try one of the known workarounds so as to be able to continue with the lessons.

More info here:

Best,
Mauro

4 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms