Bug Fix
This commit is contained in:
@@ -18,8 +18,11 @@ APS_Editor_MandatoryAnchor::APS_Editor_MandatoryAnchor()
|
|||||||
SpriteComponent->bIsScreenSizeScaled = true;
|
SpriteComponent->bIsScreenSizeScaled = true;
|
||||||
SpriteComponent->ScreenSize = 0.0015f;
|
SpriteComponent->ScreenSize = 0.0015f;
|
||||||
|
|
||||||
// Pivot icon — clearly distinct from APS_Editor_CameraStart's note icon.
|
// Target-point icon — clearly distinct from APS_Editor_CameraStart's note icon.
|
||||||
static ConstructorHelpers::FObjectFinder<UTexture2D> IconFinder(TEXT("/Engine/EditorResources/S_Pivot"));
|
// (Engine/EditorResources/S_Pivot does not exist in UE 5.5 — using S_TargetPoint instead,
|
||||||
|
// which fits the "positional anchor marker" semantic and avoids the cook-time
|
||||||
|
// "Failed to find /Engine/EditorResources/S_Pivot" CDO error.)
|
||||||
|
static ConstructorHelpers::FObjectFinder<UTexture2D> IconFinder(TEXT("/Engine/EditorResources/S_TargetPoint"));
|
||||||
if (IconFinder.Succeeded())
|
if (IconFinder.Succeeded())
|
||||||
{
|
{
|
||||||
SpriteComponent->SetSprite(IconFinder.Object);
|
SpriteComponent->SetSprite(IconFinder.Object);
|
||||||
|
|||||||
@@ -185,6 +185,19 @@ void FPS_Editor_BlueprintFromMesh::CreateBlueprintForAsset(UObject* MeshAsset)
|
|||||||
USCS_Node* EditableNode = SCS->CreateNode(UPS_Editor_EditableComponent::StaticClass(), FName("PS_Editor_Editable"));
|
USCS_Node* EditableNode = SCS->CreateNode(UPS_Editor_EditableComponent::StaticClass(), FName("PS_Editor_Editable"));
|
||||||
SCS->AddNode(EditableNode);
|
SCS->AddNode(EditableNode);
|
||||||
|
|
||||||
|
// Enable replication on the generated BP — without it the actor is server-local only and
|
||||||
|
// clients never see it spawn. SetReplicates() is the public path (the bReplicates field
|
||||||
|
// itself is protected). SetReplicateMovement is paired so any server-side transform change
|
||||||
|
// (timeline keyframe, scripted move) propagates to clients.
|
||||||
|
if (UClass* GeneratedClass = Blueprint->GeneratedClass)
|
||||||
|
{
|
||||||
|
if (AActor* CDO = Cast<AActor>(GeneratedClass->GetDefaultObject()))
|
||||||
|
{
|
||||||
|
CDO->SetReplicates(true);
|
||||||
|
CDO->SetReplicateMovement(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Compile and save
|
// Compile and save
|
||||||
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(Blueprint);
|
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(Blueprint);
|
||||||
FKismetEditorUtilities::CompileBlueprint(Blueprint);
|
FKismetEditorUtilities::CompileBlueprint(Blueprint);
|
||||||
|
|||||||
Reference in New Issue
Block a user