배우기
엔진 클래스
CaptureService
만들 수 없음
서비스

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.


요약
메서드
CaptureScreenshot(onCaptureReady: function):()
PromptSaveCapturesToGallery(captures: {any},resultCallback: function):()
PromptShareCapture(captureContent: Content,launchData: string,onAcceptedCallback: function,onDeniedCallback: function):()
ReadCapturesFromGalleryAsync(captureTypeFilters: {any},readFromAllEligibleExperiences: boolean):Tuple
TakeScreenshotCaptureAsync(onCaptureReady: function,captureParams: Dictionary):()
이벤트
CaptureSaved(captureInfo: Dictionary):RBXScriptSignal
사용되지 않음
UserCaptureSaved(captureContentId: ContentId):RBXScriptSignal
상속된 멤버

API 참조
메서드
CaptureScreenshot
기능: Capture
CaptureService:CaptureScreenshot(onCaptureReady:function):()
매개 변수
onCaptureReady:function
반환
()

CheckUploadCaptureStatusAsync
생성
기능: Capture
CaptureService:CheckUploadCaptureStatusAsync(token:string):Tuple
매개 변수
token:string
반환

PromptCaptureGalleryPermissionAsync
생성
기능: Capture
CaptureService:PromptCaptureGalleryPermissionAsync(captureGalleryPermission:Enum.CaptureGalleryPermission):boolean
매개 변수
captureGalleryPermission:Enum.CaptureGalleryPermission
반환
코드 샘플
갤러리 권한 요청
local CaptureService = game:GetService("CaptureService")
local function isGalleryAccessGranted()
-- 갤러리 권한을 요청합니다.
local accepted = CaptureService:PromptCaptureGalleryPermissionAsync(Enum.CaptureGalleryPermission.ReadAndUpload)
return accepted
end

PromptSaveCapturesToGallery
기능: Capture
CaptureService:PromptSaveCapturesToGallery(
captures:{any}, resultCallback:function
):()
매개 변수
captures:{any}
resultCallback:function
반환
()

PromptShareCapture
기능: Capture
CaptureService:PromptShareCapture(
captureContent:Content, launchData:string, onAcceptedCallback:function, onDeniedCallback:function
):()
매개 변수
captureContent:Content
launchData:string
onAcceptedCallback:function
onDeniedCallback:function
반환
()

ReadCapturesFromGalleryAsync
생성
기능: Capture
CaptureService:ReadCapturesFromGalleryAsync(
captureTypeFilters:{any}, readFromAllEligibleExperiences:boolean
매개 변수
captureTypeFilters:{any}
기본값: "{}"
readFromAllEligibleExperiences:boolean
기본값: false
반환
코드 샘플
갤러리에서 캡처를 읽고 페이지를 순회합니다
local CaptureService = game:GetService("CaptureService")
local function readCapturesFromGallery()
local allCaptures = {}
local capturesPages
local success, result = pcall(function()
local readResult, pages = CaptureService:ReadCapturesFromGalleryAsync({}, false)
if readResult == Enum.ReadCapturesFromGalleryResult.Success then
capturesPages = pages
end
return readResult
end)
if not success or result ~= Enum.ReadCapturesFromGalleryResult.Success then
-- 권한 오류 가능성, CaptureService:PromptCaptureGalleryPermissionAsync()를 참조하십시오.
warn("초기 캡처를 가져오는 데 실패했습니다: " .. result.Name)
return
end
-- 현재 페이지 반복
local currentPage = capturesPages:GetCurrentPage()
for _, capture in currentPage do
table.insert(allCaptures, capture)
end
-- 끝날 때까지 다음 페이지로 진행
while not capturesPages.IsFinished do
local advanceToNextPageSuccess, _ = pcall(function()
capturesPages:AdvanceToNextPageAsync()
end)
if not advanceToNextPageSuccess then
return
end
currentPage = capturesPages:GetCurrentPage()
for _, capture in currentPage do
table.insert(allCaptures, capture)
end
end
return allCaptures
end

StartUploadCaptureAsync
생성
기능: Capture
CaptureService:StartUploadCaptureAsync(capture:Capture):Tuple
매개 변수
capture:Capture
반환

StartVideoCaptureAsync
생성
기능: Capture
CaptureService:StartVideoCaptureAsync(
onCaptureReady:function, captureParams:Dictionary
매개 변수
onCaptureReady:function
captureParams:Dictionary
기본값: "nil"

StopVideoCapture
기능: Capture
CaptureService:StopVideoCapture():()
반환
()

TakeScreenshotCaptureAsync
기능: Capture
CaptureService:TakeScreenshotCaptureAsync(
onCaptureReady:function, captureParams:Dictionary
):()
매개 변수
onCaptureReady:function
captureParams:Dictionary
기본값: "nil"
반환
()

UploadCaptureAsync
생성
기능: Capture
CaptureService:UploadCaptureAsync(capture:Capture):Tuple
매개 변수
capture:Capture
반환
코드 샘플
자산 시스템에 캡처 업로드
local CaptureService = game:GetService("CaptureService")
local function uploadCapture(capture: Capture)
local success, result = pcall(function()
local uploadCaptureResult, assetId = CaptureService:UploadCaptureAsync(capture)
if uploadCaptureResult ~= Enum.UploadCaptureResult.Success then
-- 실패 처리
return nil
end
return assetId
end)
if not success then
-- 오류 처리
return nil
end
return result
end

이벤트
CaptureBegan
기능: Capture
CaptureService.CaptureBegan(captureType:Enum.CaptureType):RBXScriptSignal
매개 변수
captureType:Enum.CaptureType

CaptureEnded
기능: Capture
CaptureService.CaptureEnded(captureType:Enum.CaptureType):RBXScriptSignal
매개 변수
captureType:Enum.CaptureType

CaptureSaved
사용되지 않음

UserCaptureSaved
기능: Capture
CaptureService.UserCaptureSaved(captureContentId:ContentId):RBXScriptSignal
매개 변수
captureContentId:ContentId

©2026 Roblox Corporation. Roblox 및 Roblox 로고, 'Powering Imagination'은 미국 및 기타 국가 내 당사의 등록 및 미등록 상표입니다.