Description

It is believed that soft references resolved during runtime, point to the edit time instances of actors instead of the runtime instances. This issue does not reproduce when it is called from an Input Binding, only from a Widget. A work-around for this is to insert a 0.1 second Delay between the OnClick and the Transformation function.

This was reported and tested in 4.20.2 (CL-4302132). This issue was reproduced in 4.19.2 (CL-4033788) and Main 4.21 (CL-4309299)

Steps to Reproduce
  1. Open the UE4 Editor and create a blank project
  2. Create two maps (TestMap & TestMap2)
  3. Add TestMap2 as a sublevel to TestMap
  4. Create an Actor named Cube1, add a Cube component, and set it as the root.
  5. Select TestMap2 and drag an instance of Cube1 onto it
  6. Create a Widget Blueprint (CubePush) and add a Button to it
  7. Generate an OnClicked Event from the Button
  8. Create a Soft Object Reference to Cube1
  9. Add a getter to the Soft Object Reference then drag off the pin and select "Resolve Soft Reference"
  10. Drag off the resolve and add a "AddRelativeLocation" node. Set the X and Y values and connect the pin to the OnClicked Event.
  11. Open up the Level Blueprint for TestMap.
  12. Drag off BeginPlay, add a "Load Stream Level" node and set the Level Name to "TestMap2".
  13. Then add "Create Widget", set it to the Widget that was created, and add it to Viewport
  14. Add a "Player Controller" node and set "Show Mouse Cursor" to true, then connect it to "Add to Viewport"
  15. Play in Editor

Results:The Cube doesn't move when the button is pressed

Expected: The Cube moves when the button is pressed

Have Comments or More Details?

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

11
Login to Vote

Won't Fix
ComponentUE - Gameplay
Affects Versions4.19.24.20.24.214.25.3
CreatedAug 23, 2018
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue