UE5 Time of Day Blueprint System
This page is part of the documentaiton for my UE5 Time of Day Blueprint System

Example: UI / UMG

UE5 Time of Day Blueprint System Version: 2.0

    While the included HUD was created for the demo world you can easily attach it to your own project by simply adding the AC_TimeOfDay_UI component to your player controller.

    If you do not have a player controller you will need to add one and set it as the active one in your level’s game mode before you can use this feature.

    Configure the HUD

    Open the UI_TimeOfDayHUD in the UIs/TimeHUD/ folder. You should see the 6 included stats already on the bar.

    To change the position of this HUD bar on the screen select the Border from the Hierarchy panel. Then while holding both CTRL+Shift change the Anchor on the details panel under the Slot section. The 9 square anchors represent a position on the screen, select one of these while holding CTRL+Shift. The HUD will update positions.

    To remove a stat from this display just select the widget for it and then delete it.

    To add one of the already provided stats that you removed to the display use the Palette panel to add another User Created / UI Time of Day HUD Stat to the StatsBar (horizontal box) on the Hierarchy panel. You can drop it on StatsBar and it will add it to the end, or you can position it between the others.

    Configure a HUD Stat

    Each HUD Stat widget inside the Time HUD has additional settings, which you can see by selecting the widget inside the Time HUD then using the details panel to navigate to the Default section.

    OverrideName If you would like to show another label instead of the default for the stat this is where you would set the text. If you would like to change the default used you would do this inside the UI Time of Day HUD Stat widget, found in the same folder as the HUD we are currently editing.
    HUDStat This is where you can pick from the 6 included stats. To add your own see below.
    FlashonChange If set to true the HUD stat will flash everytime it changes. The flash is an animation inside the UI Time of Day HUD Stat widget.
    ShowIfRealtimeMode? If for some reason you don’t want a stat to show in real time mode, but you still want it to show in custom time mode so you can’t really just remove it, you can change the value of this boolean to false to stop it from showing in real time mode.

    Add a new HUD Stat

    If you would like to create another HUD Stat you would need to first add a new row to the enumeration E_TimeOfDay_HudStat in the Blueprints/Variables/Enums/ folder. Then to power this new stat you need to add the code for it inside of the UI_TimeOfDayHUD_Stat widget found in the UIs/TimeHUD/ folder. Take a look at the SetupStat event on the Event Graph to see how it is handling it for the other stats.

    To get updates we are binding into a number of relaying events created inside our AC_TimeOfDay_UI component (found in the Blueprints/Components/ folder), which are then being powered by the event dispatchers from our Time of Day BP in our world.

    Key Bindings

    The Time HUD is a read only display, all of the key bindings in the demo world related to jumping through time can be found in the BP_TimeOfDayController in the Demos/ folder.

    BedTime UI

    One other thing to keep in mind is that the AC_TimeOfDay_UI will scan your level to see if it detects any BP_Bed blueprints in it. If it does it will try to add the BedTime component to your player controller for you if one is not already there. If you remove the BP_Bed from the project you may get an error about this and you will need to update the code at this point to remove this check as well.

    This documentation and asset version are new. If you encounter any bugs or if anything doesn't make sense, please let me know.