Description

Timespan properties created in C++ but set in blueprints are not returning the correct values.

Steps to Reproduce
  1. Open the editor
  2. Create a new GameInstance C++ Class
  3. In the .h, add
    UPROPERTY(Category = "Test", EditAnywhere, BlueprintReadOnly)
    	FTimespan TestTimespan;
  4. Compile
  5. Create a blueprint based off of your C++ Game Instance
  6. In Edit->Project Settings->Maps and Modes, ensure to set the Default Game Instance to the blueprint game instance you created in the previous step
  7. Open the GameInstance blueprint
  8. Get TestTimespan
  9. Select TestTimespan and set a default value for it
  10. Break the timespan and print the results of each using an Append node on Event Init

Result: When you PIE, the string that is printed is 00000 instead of whatever value you set as the default in your blueprint.

Expected: The default value that was set would be printed.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

3
Login to Vote

Won't Fix
ComponentUE - Foundation - Core - UObject
Affects Versions4.13.24.144.15
Fix Commit3394352
Main Commit3427032
Release Commit3394352
CreatedDec 19, 2016
ResolvedAug 18, 2021
UpdatedMar 7, 2024
View Jira Issue