Description

This is not a regression. Tested in the following branches and change lists:

Branch Change List Results Text compared to Variable Variable added compared to Variable Text compared to Text
//UE5/Release-5.0 20979098 Reproduced PIE: True / Packaged: False PIE: True / Packaged: True PIE: True / Packaged: False
//UE5/Release-5.1 23901901 Reproduced PIE: True / Packaged: False PIE: True / Packaged: True PIE: True / Packaged: False
//UE5/Release-5.2 24608918 Reproduced PIE: True / Packaged: False PIE: True / Packaged: True PIE: True / Packaged: False

If the a variable is assigned to the contains node and that variable is added to the array it will always return true in both PIE and when packaged. I attached a blueprint with more results when using a variable etc.

Steps to Reproduce
  1. Create a new blank project
  2. Create and save a new level
  3. In the Project Settings > Maps and Modes set the newly saved level to Game Default level
  4. Open the Level Blueprint
  5. Create a Text Variable then set its type to an Array
  6. Add an element to the array then set it to Test
  7. Get a reference to the Array in the Event Graph
  8. Off the reference create a Contains node
  9. Set the text input to Test
  10. Create a Print String node connect the Contains node result to the In String input pin of the Print String node
  11. Connect the Begin Play node's execution pin to the Print String node's input execution pin
  12. Compile, save, and close the Level Blueprint
  13. Play in Editor taking note that true is printed to the screen
  14. Exit PIE then package the project for Windows
  15. Play the package

Expected Results:
When the game starts true is printed to the screen

Actual Results:
When the game starts false is printed to the screen

Have Comments or More Details?

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

1
Login to Vote

By Design
ComponentUE - Gameplay - Blueprint
Affects Versions5.1.15.0.35.2
Target Fix5.3
CreatedMar 13, 2023
ResolvedMar 15, 2023
UpdatedMar 17, 2023
View Jira Issue