表示テーマ
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)。
型の情報
- 名前空間:
NEMEngine - 型:
NEMEngine.InputActions(Class)
BlockGameplayInput
csharp
public static bool BlockGameplayInputUI が入力を消費しているフレームは gameplay クエリを抑止する層(editor / UI が設定する)。
操作:読取・変更。
GetActionID
csharp
public static InputActionID GetActionID(string name)public API
| 引数 | 型 | 既定値 |
|---|---|---|
name | string | 必須 |
戻り値:NEMEngine.InputActionID。
IsPressed
csharp
public static bool IsPressed(InputActionID action, int playerIndex = 0)Actionが押されているかを取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | NEMEngine.InputActionID | 必須 |
playerIndex | int | 0 |
戻り値:bool。
IsPressed
csharp
public static bool IsPressed(string action)string convenience overload(初回に compact ID を解決して以降は cache)。hot path では ID 版を推奨。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
戻り値:bool。
IsPressed
csharp
public static bool IsPressed(string action, int playerIndex)Actionが押されているかを取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
playerIndex | int | 必須 |
戻り値:bool。
ReadAxis
csharp
public static float ReadAxis(InputActionID action, int playerIndex = 0)Actionの1軸値を取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | NEMEngine.InputActionID | 必須 |
playerIndex | int | 0 |
戻り値:float。
ReadAxis
csharp
public static float ReadAxis(string action)Actionの1軸値を取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
戻り値:float。
ReadAxis
csharp
public static float ReadAxis(string action, int playerIndex)Actionの1軸値を取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
playerIndex | int | 必須 |
戻り値:float。
ReadVector2
csharp
public static Vector2 ReadVector2(InputActionID action, int playerIndex = 0)Actionの2軸値を取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | NEMEngine.InputActionID | 必須 |
playerIndex | int | 0 |
戻り値:NEMEngine.Vector2。
ReadVector2
csharp
public static Vector2 ReadVector2(string action)Actionの2軸値を取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
戻り値:NEMEngine.Vector2。
ReadVector2
csharp
public static Vector2 ReadVector2(string action, int playerIndex)Actionの2軸値を取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
playerIndex | int | 必須 |
戻り値:NEMEngine.Vector2。
Rebind
csharp
public static bool Rebind(InputActionID action, InputBinding binding)単一 binding へ rebind する(compact ID 経由)。保存は SaveBindings で行う。
| 引数 | 型 | 既定値 |
|---|---|---|
action | NEMEngine.InputActionID | 必須 |
binding | NEMEngine.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を判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | NEMEngine.InputActionID | 必須 |
playerIndex | int | 0 |
戻り値:bool。
WasPressed
csharp
public static bool WasPressed(string action)このframeで押されたActionを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
戻り値:bool。
WasPressed
csharp
public static bool WasPressed(string action, int playerIndex)このframeで押されたActionを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
playerIndex | int | 必須 |
戻り値:bool。
WasReleased
csharp
public static bool WasReleased(InputActionID action, int playerIndex = 0)このframeで離されたActionを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | NEMEngine.InputActionID | 必須 |
playerIndex | int | 0 |
戻り値:bool。
WasReleased
csharp
public static bool WasReleased(string action)このframeで離されたActionを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
戻り値:bool。
WasReleased
csharp
public static bool WasReleased(string action, int playerIndex)このframeで離されたActionを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
action | string | 必須 |
playerIndex | int | 必須 |
戻り値:bool。
実行時の扱い
Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。