Hi,
How can I create the following method in Blueprint.
-
Level selection in the menu
-
Selected level should start with button.
-
Level window should show the level
Hi,
How can I create the following method in Blueprint.
Level selection in the menu
Selected level should start with button.
Level window should show the level
You’ll want to use a Widget Blueprint which are used to make user interfaces. Search “unreal widget blueprints” or “unreal umg” to learn more about them.
To create a new Widget Blueprint, right-click in the Content Browser, or click the Add button, then go to the User Interface category and select Widget Blueprint. Then click User Widget. Double-click on it to edit it.
From there you can add a Panel to the layout, such as a Canvas Panel, and then add widgets, such as an Image Widget for the Level pictures, Text Widgets for the Level names, and a Button Widget for the Start button. For the images, you can take a screenshot of each Level and then import them into your Project and then assign them as the image to use for the Image Widgets. The Blueprint graph for the widget could then have an OnClicked Event for the Start Button that checks which Image Widget currently has focus and then use an Open Level node to open the appropriate Level.
To add this menu to the viewport, in your Pawn/Character blueprint, use a Create Widget node, setting the Class pin to your widget, and then connect that node to an Add to Viewport node.
Thanks, I’ll try to implement it.