Hello. Welcome to this lesson in Unreal Engine. In this lesson, we'll learn how to create an on-screen slider to control daylight in Unreal Engine. We will continue to use the ArchViz Interior Project. Open your ArchViz Interior Project, the Unreal Engine 5.0 version. We'll make an on-screen slider to control this during play. Before we do, we need a way to enable the mouse cursor on during play so we can select items. Open the Blueprints folder. Right click. Select Blueprint. And click Player Controller. We'll name this BP_ArchvizPlayer. Right click again. Select the Blueprint Class. This time we'll select a Game Mode Base. We'll name this BP_ArchvizGameMode. Double click the BP_ArchvizGameMode. This opens up the editor. We're gonna set the Player Controller Class to BP_ArchvizPlayer. Close the panel. Open World Settings. We're gonna change the GameMode Override to BP_ArchvizGameMode. Open the BP_ArchvizPlayer. We want to enable mouse interactions. Go to Details and search mouse. Check on Show Mouse Cursor and Enable Click Events. Scroll down to the Mouse Interface section and change the Default Mouse Cursor to Hand. Compile, save, and close the panel. Now play the level. Now the hand is visible. This will allow us to interact with items in the room as well as menus. Escape to stop play. Next, we will create a widget slider that will stay on screen and allow the user to adjust the time of day and see the lighting effects. Open the content drawer, Blueprints folder. Right click. Now select User Interface and Widget Blueprint. We'll name this WBP, for Widget Blueprint, underscore ArchViz. Open this up and search for canvas and drag a canvas panel into the graph. Drag a slider into the canvas, somewhere near the bottom, and scale it up a bit. Drag a text under the slider. We'll name this Morning. We'll drag two more text blocks. We'll line 'em up. We'll name the middle one Noon and the last one Evening. Select the slider in the Hierarchy. In the Details panel, open a Style section and change the Bar Thickness to 10. Go all the way down, you may have to open the panel a bit. Click On Value Changed. Click the plus. This will take you to the Event Graph. From On Value Changed, pull a wire out, search get and get Active Of Class. Search sun. Select Sun Sky. Drag a wire out of Get Actor. Search solar. We're looking for Solar Time. Wire to Return Value to Target. Next, we wanna take the value from the slider, which is only from zero to one, and scale it to values that will work properly for the Solar Time. Drag a wire from Value and search range. Select Map Range Clamped. The input range is zero to one, and we'll make the output range from four to 20. Finally, wire the Return Value to Set Solar Time pin. Compile, save, close the panel. We now need to display our widget on screen. One way to do this is open a Level Blueprint. Drag a wire from Event Tick. Search widget. Select Create Widget. Change class to WBP_ArchViz. Drag a wire from the Return Value pin, which is the blue pin, and search viewport. Select Add to Viewport and it'll automatically wires together the executive pins. Compile, save, close the panel. Now we'll play. The W, A, S, D keys will navigate us around. The mouse will help us look around the room. And now we click and drag the slider and change the time of day. And see the nice lighting effects. We'll Save All, Save Selected. In the next lesson, we're going to create interactive objects in our level. Thanks for watching.