Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

KeybindingHelper

dani0105 edited this page Apr 13, 2022 · 1 revision

KeybindingHelper

Description

This class is used to add keybiding for building and world scenes.
Note: When you change the scene the keybiding will remove, so you need add again.

Events

There are not events for this class.

Properties

There are not properties for this class.

Public Methods

static void AddOnKeyDownWorld( I_key key, Action action);

This method allow you to add a keybiding on wold scene. When the user press the key value you pass, it will execute the action that you pass.

KeybindingsPC.Key MyKey = KeyCode.T;
KeybindingHelper.AddOnKeyDownWorld( MyKey, ()=>{ } );

static void AddOnKeyDownBuilder( I_key key, Action action);

This method allow you to add a keybiding on building scene. When the user press the key value you pass, it will execute the action that you pass.

KeybindingsPC.Key MyKey = KeyCode.T;
KeybindingHelper.AddOnKeyDownBuilder( MyKey, ()=>{ } );