hello, how can i simply display a button on the game interface and make it execute my custom schematic node?

  • ok, i know how to do it now.

  • there is another issue... for example, when i use the hudclick component, i notice that there is a delay between multiple clicks. for instance, if i set it to execute a schematic on a left-click, it only executes the first click if i click multiple times in a short period of time. it will only execute subsequent clicks if the interval between clicks exceeds a certain time. i was wondering if it would be possible to add a custom setting for the interval between multiple clicks.
  • i actually want to implement a feature like this, for example, when i click a button, the current button will turn into a ui similar to a progress bar. after the progress bar is completed, my schematic will be executed… it seems difficult to implement, i don’t know how to achieve it.

  • i understand how to do it, i just need to turn the schematic i need to execute into a skill, and then use it through the hud.

  • edited May 2023
    Clicking in fast succession will let Unity interpret the click as double click, tripple click, etc. - so it no longer is a 1 click count.

    As for the progress bar - using an ability is probably the best approach.
    Alternatively, there are also HUD value bar components to e.g. show a float variable.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • alright, indeed, using a skill is the most convenient way to do it.

  • edited May 2023
    i have encountered an issue, for example: i have displayed a skill on the menu screen, and i do not want to use the method of calling the sub-menu. are there any other methods to call similar functions such as upgrade, use, etc.? for example, can i directly use the hud? however, i do not know how to add a button directly in the hud, such as clicking to upgrade skills, clicking to use skills, and so on.

    because using sub-menus cannot achieve the ui layout i want, and sub-menus cannot display all the sub-menus under all skills at the same time, they can only display the sub-menu that appears after you click on a certain skill.

    Post edited by ranwang520 on
  • You can change the default action of the menu part, i.e. the functionality is used on accepting something.
    Alternatively, the sub-menu can define input keys for the different options, i.e. you can directly use the functionality via the keys without opening the sub-menu.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • translate to english: what if it’s a mobile device?

  • edited May 2023
    You can use virtual controls via a HUD, e.g. see this tutorial setup as an example.

    They can be added to any HUD, e.g. also as part of a HUD template shown in the menu screen.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I am using virtual controls, but I have found that if a virtual control is inside a button, clicking the virtual control will prevent the buttons within it from executing. In the screen menu → Abilities, each ability is wrapped in a button.


  • That might be some layouting issue - the higher level virtual control (being a child of the button) should get the click and not the button below it.
    Can you give me details on your button prefab's setup with the virtual control? I can make some tests with that.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • My rough idea is that in the screen menu and abilities, I use HUD and then put a virtual control on the HUD. As you mentioned before, I use buttons to execute submenus. At this point, if I click on an ability and it touches the virtual control, the focus won't jump to the section I clicked on.
  • Ah, yeah ... because the click is consumed by the HUD's virtual control and doesn't reach the button.
    You could currently use Cursor Over Selection (set up in UI > UI Boxes > General Settings to select the button/input the cursor is over.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Next update will forward click-selection to parent inputs of UI boxes if these clickable HUD components (e.g. virtual controls or HUD Click component) are used as part of an input.
    So, clicking on a virtual control as part of a button will also select that input button in the UI box.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.