Skip to content

PlayerInput ​

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

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

型の情報 ​

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

GetGamepadAxis ​

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

指定ゲームパッドのスティックまたはトリガーの値を取得します。

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

戻り値:float。

GetGamepadButton ​

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

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

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

戻り値:bool。

GetGamepadButtonDown ​

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

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

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

戻り値:bool。

GetGamepadButtonUp ​

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

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

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

戻り値:bool。

GetGamepadIndex ​

csharp
public static int GetGamepadIndex(int playerIndex)

このPlayerへ割り当てられたゲームパッド番号です。

引数型既定値
playerIndexint必須

戻り値:int。

GetKey ​

csharp
public static bool GetKey(int playerIndex, KeyCode key)

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

引数型既定値
playerIndexint必須
keyNEMEngine.KeyCode必須

戻り値:bool。

GetKeyDown ​

csharp
public static bool GetKeyDown(int playerIndex, KeyCode key)

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

引数型既定値
playerIndexint必須
keyNEMEngine.KeyCode必須

戻り値:bool。

GetKeyUp ​

csharp
public static bool GetKeyUp(int playerIndex, KeyCode key)

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

引数型既定値
playerIndexint必須
keyNEMEngine.KeyCode必須

戻り値:bool。

GetMouseButton ​

csharp
public static bool GetMouseButton(int playerIndex, int button)

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

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

戻り値:bool。

GetMouseButtonDown ​

csharp
public static bool GetMouseButtonDown(int playerIndex, int button)

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

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

戻り値:bool。

GetMouseButtonUp ​

csharp
public static bool GetMouseButtonUp(int playerIndex, int button)

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

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

戻り値:bool。

IsAvailable ​

csharp
public static bool IsAvailable(int playerIndex)

Playerの操作機器が利用できるかを調べます。

引数型既定値
playerIndexint必須

戻り値:bool。

MaxPlayers ​

csharp
public const int MaxPlayers

同時に扱えるPlayer数の上限です。

操作:読取専用。

定義値:4。

PlayVibration ​

csharp
public static uint PlayVibration(int playerIndex, float left, float right, float duration, float attack = 0, float release = 0)

Playerに割り当てられたゲームパッドを振動させます。

引数型既定値
playerIndexint必須
leftfloat必須
rightfloat必須
durationfloat必須
attackfloat0
releasefloat0

戻り値:uint。

StopVibration ​

csharp
public static void StopVibration(int playerIndex, uint handle)

Playerのゲームパッド振動を停止します。

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

実行時の扱い ​

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

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