Skip to content

InputActions ​

project-level の Input Action Map。起動時/明示 reload 時だけ JSON を parse し、 以降は compact index と runtime 配列で評価する(gameplay frame で JSON/file/string scan しない)。 設定: ProjectSettings/InputActions.json(default)。UserSettings/Runtime/InputActions.json(user override)。

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

型の情報 ​

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

BlockGameplayInput ​

csharp
public static bool BlockGameplayInput

UI が入力を消費しているフレームは gameplay クエリを抑止する層(editor / UI が設定する)。

操作:読取・変更。

GetActionID ​

csharp
public static InputActionID GetActionID(string name)

public API

引数型既定値
namestring必須

戻り値:NEMEngine.InputActionID。

IsPressed ​

csharp
public static bool IsPressed(InputActionID action, int playerIndex = 0)

Actionが押されているかを取得します。

引数型既定値
actionNEMEngine.InputActionID必須
playerIndexint0

戻り値:bool。

IsPressed ​

csharp
public static bool IsPressed(string action)

string convenience overload(初回に compact ID を解決して以降は cache)。hot path では ID 版を推奨。

引数型既定値
actionstring必須

戻り値:bool。

IsPressed ​

csharp
public static bool IsPressed(string action, int playerIndex)

Actionが押されているかを取得します。

引数型既定値
actionstring必須
playerIndexint必須

戻り値:bool。

ReadAxis ​

csharp
public static float ReadAxis(InputActionID action, int playerIndex = 0)

Actionの1軸値を取得します。

引数型既定値
actionNEMEngine.InputActionID必須
playerIndexint0

戻り値:float。

ReadAxis ​

csharp
public static float ReadAxis(string action)

Actionの1軸値を取得します。

引数型既定値
actionstring必須

戻り値:float。

ReadAxis ​

csharp
public static float ReadAxis(string action, int playerIndex)

Actionの1軸値を取得します。

引数型既定値
actionstring必須
playerIndexint必須

戻り値:float。

ReadVector2 ​

csharp
public static Vector2 ReadVector2(InputActionID action, int playerIndex = 0)

Actionの2軸値を取得します。

引数型既定値
actionNEMEngine.InputActionID必須
playerIndexint0

戻り値:NEMEngine.Vector2。

ReadVector2 ​

csharp
public static Vector2 ReadVector2(string action)

Actionの2軸値を取得します。

引数型既定値
actionstring必須

戻り値:NEMEngine.Vector2。

ReadVector2 ​

csharp
public static Vector2 ReadVector2(string action, int playerIndex)

Actionの2軸値を取得します。

引数型既定値
actionstring必須
playerIndexint必須

戻り値:NEMEngine.Vector2。

Rebind ​

csharp
public static bool Rebind(InputActionID action, InputBinding binding)

単一 binding へ rebind する(compact ID 経由)。保存は SaveBindings で行う。

引数型既定値
actionNEMEngine.InputActionID必須
bindingNEMEngine.InputBinding必須

戻り値:bool。

ReloadBindings ​

csharp
public static bool ReloadBindings()

user override ファイルへ atomic 保存する(project default は変更しない)。

戻り値:bool。

SaveBindings ​

csharp
public static bool SaveBindings()

現在のInputActionBindingを保存

戻り値:bool。

WasPressed ​

csharp
public static bool WasPressed(InputActionID action, int playerIndex = 0)

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

引数型既定値
actionNEMEngine.InputActionID必須
playerIndexint0

戻り値:bool。

WasPressed ​

csharp
public static bool WasPressed(string action)

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

引数型既定値
actionstring必須

戻り値:bool。

WasPressed ​

csharp
public static bool WasPressed(string action, int playerIndex)

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

引数型既定値
actionstring必須
playerIndexint必須

戻り値:bool。

WasReleased ​

csharp
public static bool WasReleased(InputActionID action, int playerIndex = 0)

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

引数型既定値
actionNEMEngine.InputActionID必須
playerIndexint0

戻り値:bool。

WasReleased ​

csharp
public static bool WasReleased(string action)

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

引数型既定値
actionstring必須

戻り値:bool。

WasReleased ​

csharp
public static bool WasReleased(string action, int playerIndex)

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

引数型既定値
actionstring必須
playerIndexint必須

戻り値:bool。

実行時の扱い ​

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

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