This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues/pull-requests.
2022-11-02 19:28:50 +09:00
|
|
|
# SkyHook-Unity
|
|
|
|
|
2022-11-06 10:57:35 +09:00
|
|
|
SkyHook for Unity
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
1. Open package manager with `Window -> Package Manager`
|
|
|
|
2. Press `+` button and find `Add package from git URL...`
|
|
|
|
|
|
|
|
![Add package from git URL](images/tuto1.png)
|
|
|
|
|
|
|
|
3. Enter `git+https://git.pikokr.dev/SkyHook/SkyHook-Unity.git` and press `Add` button
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
### Start and stop hook
|
|
|
|
|
|
|
|
```cs
|
|
|
|
SkyHookManager.StartHook(); // Start Hook
|
|
|
|
|
|
|
|
SkyHookManager.StopHook(); // Stop Hook, this is automatically called on exit
|
|
|
|
```
|
|
|
|
|
|
|
|
### Receive events
|
|
|
|
|
|
|
|
> NOTE: SkyHook does **NOT** give the correct key code. So you can't know what key the user actually pressed.
|
|
|
|
|
|
|
|
```cs
|
2022-11-06 12:24:55 +09:00
|
|
|
SkyHookManager.KeyUpdated.AddListener(ev => {
|
2022-11-06 10:57:35 +09:00
|
|
|
// Your code
|
|
|
|
});
|
|
|
|
```
|