배우기
엔진 클래스
ChatWindowConfiguration
만들 수 없음

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


코드 샘플
전체 채팅 UI 경계 가져오기
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local windowConfig = TextChatService.ChatWindowConfiguration
local inputBarConfig = TextChatService.ChatInputBarConfiguration
local function getTotalChatBounds()
local windowPos = windowConfig.AbsolutePosition
local windowSize = windowConfig.AbsoluteSize
local inputPos = inputBarConfig.AbsolutePosition
local inputSize = inputBarConfig.AbsoluteSize
-- 두 개의 직사각형의 합집합을 계산하여 전체 채팅 UI 경계를 구합니다.
-- 보고된 값은 채팅 창의 상단 및 하단 가장자리의 장식 bevel을 포함하지 않습니다.
local topLeft = Vector2.new(
math.min(windowPos.X, inputPos.X),
math.min(windowPos.Y, inputPos.Y)
)
local bottomRight = Vector2.new(
math.max(windowPos.X + windowSize.X, inputPos.X + inputSize.X),
math.max(windowPos.Y + windowSize.Y, inputPos.Y + inputSize.Y)
)
return topLeft, bottomRight - topLeft
end
-- 채팅 UI가 초기화되고 절대 값을 보고할 때까지 기다립니다.
task.wait(2)
local position, size = getTotalChatBounds()
print("전체 채팅 UI 위치:", position)
print("전체 채팅 UI 크기:", size)
-- 경계를 시각적으로 확인하기 위해 반투명 프레임을 겹쳐 놓습니다.
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ChatBoundsDebug"
screenGui.DisplayOrder = 100
screenGui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Position = UDim2.fromOffset(position.X, position.Y)
frame.Size = UDim2.fromOffset(size.X, size.Y)
frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BorderSizePixel = 2
frame.BorderColor3 = Color3.fromRGB(255, 0, 0)
frame.Parent = screenGui

API 참조
속성
AbsolutePosition
읽기 전용
복제되지 않음
기능: Chat
ChatWindowConfiguration.AbsolutePosition:Vector2

AbsoluteSize
읽기 전용
복제되지 않음
기능: Chat
ChatWindowConfiguration.AbsoluteSize:Vector2

BackgroundColor3
병렬 읽기
기능: Chat
ChatWindowConfiguration.BackgroundColor3:Color3

BackgroundTransparency
병렬 읽기
기능: Chat
ChatWindowConfiguration.BackgroundTransparency:number

Enabled
병렬 읽기
기능: Chat
ChatWindowConfiguration.Enabled:boolean

FontFace
병렬 읽기
기능: Chat
ChatWindowConfiguration.FontFace:Font

HeightScale
병렬 읽기
기능: Chat
ChatWindowConfiguration.HeightScale:number

HorizontalAlignment
기능: Chat
ChatWindowConfiguration.HorizontalAlignment:Enum.HorizontalAlignment

TextColor3
병렬 읽기
기능: Chat
ChatWindowConfiguration.TextColor3:Color3

TextSize
병렬 읽기
기능: Chat
ChatWindowConfiguration.TextSize:number

TextStrokeColor3
병렬 읽기
기능: Chat
ChatWindowConfiguration.TextStrokeColor3:Color3

TextStrokeTransparency
병렬 읽기
기능: Chat
ChatWindowConfiguration.TextStrokeTransparency:number

VerticalAlignment
기능: Chat
ChatWindowConfiguration.VerticalAlignment:Enum.VerticalAlignment

WidthScale
병렬 읽기
기능: Chat
ChatWindowConfiguration.WidthScale:number

메서드
DeriveNewMessageProperties
기능: Chat
ChatWindowConfiguration:DeriveNewMessageProperties():ChatWindowMessageProperties
코드 샘플
CanUsersDirectChatAsync
local TextChatService = game:GetService("TextChatService")
local directChatParticipants = TextChatService:CanUsersDirectChatAsync(userId1, { userId2 })
-- 적격 참가자를 확인합니다.
if #directChatParticipants > 0 then
local directChannel = Instance.new("TextChannel")
directChannel.Parent = TextChatService
for _, participant in directChatParticipants do
directChannel:AddUserAsync(participant)
end
return directChannel
end
warn("TextChannel을 생성할 수 없습니다. 적격 사용자가 충분하지 않습니다.")
return nil

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