배우기
엔진 클래스
PartOperation

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



API 참조
속성
RenderFidelity
플러그인 보안
병렬 읽기
기능: Basic, CSG
PartOperation.RenderFidelity:Enum.RenderFidelity

SmoothingAngle
플러그인 보안
병렬 읽기
기능: Basic, CSG
PartOperation.SmoothingAngle:number

TriangleCount
Roblox 보안
병렬 읽기
기능: Basic, CSG
PartOperation.TriangleCount:number

UsePartColor
병렬 읽기
기능: Basic, CSG
PartOperation.UsePartColor:boolean

메서드
SubstituteGeometry
기능: Basic, CSG
PartOperation:SubstituteGeometry(source:Instance):()
매개 변수
source:Instance
반환
()
코드 샘플
대체 기하학 및 드롭 제약 조건
local GeometryService = game:GetService("GeometryService")
local mainPart = workspace.PurpleBlock
local otherParts = { workspace.BlueBlock }
local options = {
CollisionFidelity = Enum.CollisionFidelity.Default,
RenderFidelity = Enum.RenderFidelity.Automatic,
SplitApart = false,
}
local constraintOptions = {
tolerance = 0.1,
weldConstraintPreserve = Enum.WeldConstraintPreserve.All,
}
-- 비동기이므로 pcall()에서 유니온 작업 수행
local success, newParts = pcall(function()
return GeometryService:UnionAsync(mainPart, otherParts, options)
end)
if success and #newParts > 0 and mainPart:IsA("PartOperation") then
-- 결과 작업에서 첫 번째 파트를 대체에 사용할 파트로 설정
-- 첫 번째 파트는 단순히 옵션일 뿐; 이는 어떤 PartOperation이든 될 수 있습니다
local substitutePart = newParts[1]
-- 메인 파트의 위치로 파트 재배치
substitutePart.CFrame = mainPart.CFrame
-- 보존하거나 드롭할 제약 조건/부착물을 계산
local recommendedTable = GeometryService:CalculateConstraintsToPreserve(mainPart, newParts, constraintOptions)
-- 메인 파트의 기하학을 대체 기하학으로 대체
mainPart:SubstituteGeometry(substitutePart)
-- 대체와 함께 자동으로 보존되지 않는 제약 조건/부착물 드롭
for _, item in pairs(recommendedTable) do
if item.Attachment then
if item.ConstraintParent == nil then
item.Constraint.Parent = nil
end
if item.AttachmentParent == nil then
item.Attachment.Parent = nil
end
elseif item.WeldConstraint then
if item.Parent == nil then
item.WeldConstraint.Parent = nil
end
end
end
-- 다른 파트 파괴
for _, otherPart in pairs(otherParts) do
otherPart.Parent = nil
otherPart:Destroy()
end
end

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