学ぶ
エンジンクラス
GamepadService
作成できません
サービス
複製されていません

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


概要
継承されたメンバー

APIリファレンス
プロパティ
GamepadCursorEnabled
Robloxのスクリプトセキュリティ
並列読み取り
機能: Input
GamepadService.GamepadCursorEnabled:boolean
コードサンプル
GamepadService - ゲームパッドカーソル有効プロパティ
local gamepadService = game.GamepadService
gamepadService:GetPropertyChangedSignal("GamepadCursorEnabled"):Connect(function()
local enabled = gamepadService.GamepadCursorEnabled
if enabled then
-- バーチャルカーソルが有効なときのカスタムコード
else
-- バーチャルカーソルが無効なときのカスタムコード
end
end)

方法
DisableGamepadCursor
機能: Input
GamepadService:DisableGamepadCursor():()
戻り値
()
コードサンプル
ゲームパッドサービス - ゲームパッドカーソルを無効にする
local gamepadService = game.GamepadService
local userInputService = game.UserInputService
userInputService.InputBegan:Connect(function(inputObject, gameProcessed)
if inputObject.KeyCode == Enum.KeyCode.ButtonB then
gamepadService:DisableGamepadCursor()
end
end)

EnableGamepadCursor
機能: Input
GamepadService:EnableGamepadCursor(guiObject:Instance):()
パラメータ
guiObject:Instance
戻り値
()
コードサンプル
ゲームパッドサービス - ゲームパッドカーソルを有効にする
local gamepadService = game.GamepadService
local userInputService = game.UserInputService
local startObject = script.Parent
userInputService.InputBegan:Connect(function(inputObject, gameProcessed)
-- ボタンAが押された場合にゲームパッドカーソルを有効にする
if inputObject.KeyCode == Enum.KeyCode.ButtonA then
gamepadService:EnableGamepadCursor(startObject)
end
end)

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。