Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

wangwenfeng0/UnityTool-GlobalInput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

GlobalInput - Unity3D tool

This is a script that will hook into windows event system and add a callback function to send keyboad events to unity even when unity doesnt have focus.

Note: This system works on windows only

Place the script anywhere in your assets folder and it will take care of the rest.

Functions available:

// Keycodes are stored in GlobalKeyCode
// e.g. GlobalKeyCode.LEFT is the left arrow key
// GetKey
GlobalInput.GetKey( GlobalKeyCode );
	// Works the same as Input.GetKey( KeyCode )
	// Will output TRUE if the key in the parentheses is being held
 
// GetKeyDown
GlobalInput.GetKeyDown( GlobalKeyCode );
	// Works the same as Input.GetKeyDown( KeyCode )
	// Will output TRUE only ONCE if the key in the parentheses is being held
 
// GetKeyUp
GlobalInput.GetKeyUp( GlobalKeyCode );
	// Works the same as Input.GetKeyUp( KeyCode )
	// Will output TRUE only ONCE when the key in the parentheses is lifted after being pressed

About

Unity tool to grab keyboard events even when unity doesn't have focus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • C# 100.0%

AltStyle によって変換されたページ (->オリジナル) /