Description

When a child actor passes a string to it's parent's overloaded constructor using an overridden function that returns a string it won't receive the correct string. I have verified that the correct function is being called in the child actor. Attached are the files and linked is a project that demonstrates the issue. 

Google Link: [Link Removed]

Reproduced in 4.22.3 CL#7053642

Reproduced in 4.23.0 CL#8386587, 4.24 Main CL#9016221

Steps to Reproduce

1. Create a new first person shooter project with starter content. 

2. Create a parent(ParentActor) and child(Child Actor) class (reference .h's and .cpp's attached).

     a. In ParentActor add a UStaticMeshComponent* member and create a function (Init(FString)) to find a static mesh in the content browser and add it to the actor.

     b. Create a virtual GetMeshPath function that returns a path to the relevant mesh .

     b. Override GetMeshPath() in to have a path to a different mesh in ChildActor.

     c. Overload the ParentActor Constructor to take in a FString and add a Static Mesh Component using Init(FString).

     d. Make the Child Actor call the overloaded ParentActor Constructor.

3. Place the a ParentActor and ChildActor in the level.

 

 

Results: The ChildActor has the same mesh as the ParentActor.

Expected: Both actors have different meshes.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-80778 in the post.

0
Login to Vote

Non-Issue
ComponentUE - Gameplay
Affects Versions4.234.244.22.3
CreatedSep 24, 2019
ResolvedSep 24, 2019
UpdatedSep 30, 2019