Create a custom button in the editor’s UI via Modules (C++) + Quick Day/Night Toggle in the Editor
https://dev.epicgames.com/community/learning/tutorials/ODKM/unreal-engine-create-a-custom-button-in-the-editor-s-ui-via-modules-c-quick-day-night-toggle-in-the-editor