Skip to content

Input ​

Inputは入力で使用する型です。下記にゲームコードから利用できる宣言を掲載します。

使い方と前提条件 · C# API一覧

型の情報 ​

  • 名前空間:NEMEngine
  • 型:NEMEngine.Input(Class)

ConnectedGamepadCount ​

csharp
public static int ConnectedGamepadCount

接続中のゲームパッド数です。

操作:読取専用。

GetGamepadAxis ​

csharp
public static float GetGamepadAxis(int index, GamepadAxis axis)

dead zone 未適用の raw 軸値(stick は [-1,1]、trigger は [0,1])。dead zone は InputActions 側で適用する。

引数型既定値
indexint必須
axisNEMEngine.GamepadAxis必須

戻り値:float。

GetGamepadButton ​

csharp
public static bool GetGamepadButton(GamepadButton button)

単一 gamepad(index 0)向け convenience。

引数型既定値
buttonNEMEngine.GamepadButton必須

戻り値:bool。

GetGamepadButton ​

csharp
public static bool GetGamepadButton(int index, GamepadButton button)

ゲームパッドの指定ボタンの押下状態です。

引数型既定値
indexint必須
buttonNEMEngine.GamepadButton必須

戻り値:bool。

GetGamepadButtonDown ​

csharp
public static bool GetGamepadButtonDown(GamepadButton button)

このframeで押されたゲームパッドのボタンを判定します。

引数型既定値
buttonNEMEngine.GamepadButton必須

戻り値:bool。

GetGamepadButtonDown ​

csharp
public static bool GetGamepadButtonDown(int index, GamepadButton button)

このframeで押されたゲームパッドのボタンを判定します。

引数型既定値
indexint必須
buttonNEMEngine.GamepadButton必須

戻り値:bool。

GetGamepadButtonUp ​

csharp
public static bool GetGamepadButtonUp(GamepadButton button)

このframeで離されたゲームパッドのボタンを判定します。

引数型既定値
buttonNEMEngine.GamepadButton必須

戻り値:bool。

GetGamepadButtonUp ​

csharp
public static bool GetGamepadButtonUp(int index, GamepadButton button)

このframeで離されたゲームパッドのボタンを判定します。

引数型既定値
indexint必須
buttonNEMEngine.GamepadButton必須

戻り値:bool。

GetKey ​

csharp
public static bool GetKey(KeyCode key)

指定キーが現在押されているかを取得します。

引数型既定値
keyNEMEngine.KeyCode必須

戻り値:bool。

GetKeyDown ​

csharp
public static bool GetKeyDown(KeyCode key)

このframeで押されたキーを判定します。

引数型既定値
keyNEMEngine.KeyCode必須

戻り値:bool。

GetKeyUp ​

csharp
public static bool GetKeyUp(KeyCode key)

このframeで離されたキーを判定します。

引数型既定値
keyNEMEngine.KeyCode必須

戻り値:bool。

GetMouseButton ​

csharp
public static bool GetMouseButton(MouseButton button)

指定したマウスボタンが押されているかを取得します。

引数型既定値
buttonNEMEngine.MouseButton必須

戻り値:bool。

GetMouseButton ​

csharp
public static bool GetMouseButton(int button)

int overload(0=Left, 1=Right, 2=Middle)

引数型既定値
buttonint必須

戻り値:bool。

GetMouseButtonDown ​

csharp
public static bool GetMouseButtonDown(MouseButton button)

このframeで押したマウスボタンを判定します。

引数型既定値
buttonNEMEngine.MouseButton必須

戻り値:bool。

GetMouseButtonDown ​

csharp
public static bool GetMouseButtonDown(int button)

このframeで押したマウスボタンを判定します。

引数型既定値
buttonint必須

戻り値:bool。

GetMouseButtonUp ​

csharp
public static bool GetMouseButtonUp(MouseButton button)

このframeで離したマウスボタンを判定します。

引数型既定値
buttonNEMEngine.MouseButton必須

戻り値:bool。

GetMouseButtonUp ​

csharp
public static bool GetMouseButtonUp(int button)

このframeで離したマウスボタンを判定します。

引数型既定値
buttonint必須

戻り値:bool。

HasFocus ​

csharp
public static bool HasFocus

ウィンドウがフォーカスを持っているか

操作:読取専用。

IsGamepadConnected ​

csharp
public static bool IsGamepadConnected(int index)

--------- 多 gamepad(最大4台)/ text / focus ----------------------------

引数型既定値
indexint必須

戻り値:bool。

TextInput ​

csharp
public static string TextInput

このフレームに入力された文字列(frame-local。確定文字のみ)

操作:読取専用。

inputType ​

csharp
public static InputType inputType

最後に操作された入力デバイスタイプ

操作:読取専用。

isGamepadConnected ​

csharp
public static bool isGamepadConnected

先頭ゲームパッドの接続状態です。

操作:読取専用。

leftStick ​

csharp
public static Vector2 leftStick

先頭ゲームパッドの左スティックの2軸値です。

操作:読取専用。

leftTrigger ​

csharp
public static float leftTrigger

先頭ゲームパッドの左トリガー値です。

操作:読取専用。

mouseDelta ​

csharp
public static Vector2 mouseDelta

このframeのマウス移動量です。

操作:読取専用。

mousePosition ​

csharp
public static Vector2 mousePosition

ゲームView内でのマウス位置です。

操作:読取専用。

mouseRangeControl ​

csharp
public static bool mouseRangeControl

マウス移動範囲制御のON/OFF

操作:読取・変更。

mouseWheel ​

csharp
public static float mouseWheel

このframeのマウスホイール移動量です。

操作:読取専用。

rightStick ​

csharp
public static Vector2 rightStick

先頭ゲームパッドの右スティックの2軸値です。

操作:読取専用。

rightTrigger ​

csharp
public static float rightTrigger

先頭ゲームパッドの右トリガー値です。

操作:読取専用。

実行時の扱い ​

Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。

現行版マニュアル · 8ea58ba2 · 2026-10-28確認