エンジンクラス
AudioPages
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
コードサンプル
音楽検索タイトルの取得
local AssetService = game:GetService("AssetService")
local audioSearchParams = Instance.new("AudioSearchParams")
audioSearchParams.SearchKeyword = "幸せ"
local success, result = pcall(function()
return AssetService:SearchAudioAsync(audioSearchParams)
end)
if success then
local currentPage = result:GetCurrentPage()
for _, audio in currentPage do
print(audio.Title)
end
else
warn("AssetService エラー: " .. result)
end
--[[ 戻りデータ形式
{
"AudioType": string,
"Artist": string,
"Title": string,
"Tags": {
"string"
},
"Id": number,
"IsEndorsed": boolean,
"Description": string,
"Duration": number,
"CreateTime": string,
"UpdateTime": string,
"Creator": {
"Id": number,
"Name": string,
"Type": number,
"IsVerifiedCreator": boolean
}
}
--]]