Michsky – Docs Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 
Michsky – Docs Michsky – Docs
Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 

Beam UI

  • Quick Start
  • Animations
  • Controller & Input
    • Controller Manager
    • Controller Presets
    • Hotkey Event
    • UI Navigation
  • Handlers & Managers
    • Achievements
    • Audio
    • Chapters
    • Credits
    • Effects
    • In-Game
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Dropdown
    • Modal Window
    • Notifications
    • Panel Manager
    • Progress Bar
    • Selectors
    • Sidebar
    • Slider
    • Switch
    • Timer
    • Widgets
    • Others
  • UI Manager
  • Others & Add-ons
  • FAQs
  1. Home
  2. Beam UI
  3. Controller & Input
  4. Hotkey Event
Updated on January 23, 2024

Beam UI

  • Quick Start
  • Animations
  • Controller & Input
    • Controller Manager
    • Controller Presets
    • Hotkey Event
    • UI Navigation
  • Handlers & Managers
    • Achievements
    • Audio
    • Chapters
    • Credits
    • Effects
    • In-Game
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Dropdown
    • Modal Window
    • Notifications
    • Panel Manager
    • Progress Bar
    • Selectors
    • Sidebar
    • Slider
    • Switch
    • Timer
    • Widgets
    • Others
  • UI Manager
  • Others & Add-ons
  • FAQs

Hotkey Event

Author: admin 96 views

Fires events based on given user input.

Workflow

There are two types of modes in this component.

  • Custom: Fires events when the hotkey is triggered.
  • Dynamic: Fires events when the hotkey is triggered and dynamically changes the indicator/UI.

You can see a screenshot of the dynamic mode below. You can use the create menu to create new dynamic hotkeys and select ‘Hotkey Indicator’ from the list.

Indicator (Dynamic) example

The dynamic mode requires a default preset to work. As long as there’s a valid Controller Manager in the scene, this field will automatically be set.

In order to change the indicator UI, you must assign a valid Key ID. You can use the search bar to do this easily, as it will automatically search for the valid keys.

As long as the localization or ‘Use Localization’ options are disabled (available in the settings tab), ‘Hotkey Label’ will be used. If localization is enabled, the label will be set by ‘Localized Object’ which is attached to the same game object.

Scripting

				
					using UnityEngine;
using Michsky.UI.Beam; // Namespace

public class SampleClass : MonoBehaviour
{
    [SerializeField] private HotkeyEvent hotkeyEvent;

    void Start()
    {
        // Set indicator label
        hotkeyEvent.SetLabel("New Label");

        // Apply the changes and update UI
        hotkeyEvent.UpdateUI();

        // Change the normal state opacity
        hotkeyEvent.normalOpacity = 0.5f;

        // Enable or disable sounds
        hotkeyEvent.useSounds = true;
    }
}
				
			

How can we help?

A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.

© 2024 Michsky