Jump to content
Aveyond Studios Community
Sign in to follow this  
Ant

Create a new menu or modify an existing one

Recommended Posts

What are Menu Templates?

HeroKit comes with several default menus. These include a Save Game Menu, Load Game Menu, Options Menu, Inventory Menu, Journal Menu, and Dialog Box. 

A menu template includes: 

  • A prefab which contains the layout for the menu. 
  • A hero object which acts as a controller for the menu. This controller determines what happens when something in the menu receives interaction (like a button). 
  • If the menu contains a list of things (like an Inventory Menu), a hero object which acts as a controller for the item in the menu (like a sword in an Inventory Menu). 
  • Menu templates are stored in this directory in the Project tab: 
    HeroKit/Hero Engine/Assets/Resources/Hero Templates/Menus 

Modify the look of a menu template:

Spoiler
  1. In the Project tab, go to HeroKit/Hero Engine/Assets/Resources/Hero Templates/Menus. 
  2. Drag the prefab for the menu into Hierarchy tab. A game object for the menu is created. 
  3. In the Inspector Tab, mark the Canvas checkbox. 
  4. In the Hierarchy tab, make your physical changes to the menu. 
  5. When you are finished, go to the Inspector Tab. 
  6. Unmark the Canvas checkbox. 
  7. Click Apply. This updates the prefab for the menu in the Project tab. 

Notes: HeroKit menus are just like any menu you can make in Unity. To learn more about general menu design in Unity, there are tons of tutorials on YouTube. Just do a search for Unity Menu Tutorial and you'll find lots of help. 

Create a new menu template:

Spoiler

You can create a new menu template, but please be advised that this requires some programming. Here is an example of how you might do this:

  1. In the Project tab, go to HeroKit/Hero Engine/Assets/Resources/Hero Templates/Menus. 
  2. Duplicate an existing menu template (and menu item) that is similar to what you want to create. 
  3. Duplicate the hero object controllers that are assigned to the menu template you duplicated. 
  4. Follow the steps in How to modify look of a menu template to customize the look of your menu. 
  5. Update the menu template (and menu item) so that any hero game objects attached to it are the new ones you just duplicated. 
  6. In the Project tab, go to HeroKit/Hero Actions/Core/Menus and duplicate the actions that you want to use in your new menu. 
  7. Duplicate the scripts for the actions that you duplicated. 
  8. Edit the scripts to do what you want in your new menu. 

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×