Skip to content

LambdaLabsHQ/unity-agent-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Agent Input

Keyboard and mouse input simulation for AI agents in Unity Play Mode.

Requirements

Installation

Add both packages to your project's Packages/manifest.json:

{
  "dependencies": {
    "com.lambda-labs.unity-repl": "https://github.com/LambdaLabsHQ/unity-repl.git",
    "com.lambda-labs.unity-agent-input": "https://github.com/LambdaLabsHQ/unity-agent-input.git"
  }
}

Usage from REPL

// Must be in Play Mode
LambdaLabs.UnityAgentInput.InputAbility.PressKey(UnityEngine.InputSystem.Key.W);
// ... advance frames ...
LambdaLabs.UnityAgentInput.InputAbility.ReleaseKey(UnityEngine.InputSystem.Key.W);
LambdaLabs.UnityAgentInput.InputAbility.ClearAllInput();

Why this exists

Unity's InputSystem processes the hardware event buffer each frame, which overwrites any synthetic state injected mid-frame. InputAbility hooks InputSystem.onAfterUpdate to re-inject held state after the buffer is fully processed, so synthetic inputs persist correctly across frames.

License

This package is part of the Unity REPL project and is licensed under the GNU Affero General Public License v3.0.

About

No description, website, or topics provided.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages