Class.AssetsService:SearchAudio()에 의해 반환된 특별한 버전의 AssetService:SearchAudio() 클래스입니다. 참조 데이터 형식에 대한 참조는 다음 코드 샘플을 참조하십시오.
코드 샘플
This code gets the music assets returned by the keyword "happy" and prints out their titles.
Getting Music Search Titles
local AssetService = game:GetService("AssetService")
local audioSearchParams = Instance.new("AudioSearchParams")
audioSearchParams.SearchKeyword = "happy"
local success, result = pcall(function()
return AssetService:SearchAudio(audioSearchParams)
end)
if success then
local currentPage = result:GetCurrentPage()
for _, audio in currentPage do
print(audio.Title)
end
else
warn("AssetService error: " .. result)
end
--[[ Returned data format
{
"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
}
}
--]]
요약
속성
Pages에서 상속된 속성
메서드
Pages에서 상속된 속성