SharedTableRegistry

사용되지 않는 항목 표시
만들 수 없음
서비스
복제되지 않음

Provides a global registry of named SharedTable objects. It can be used to store SharedTable objects that are used by multiple scripts.

속성

메서드

GetSharedTable

병렬 쓰기

Gets the registered SharedTable with the specified name. If no SharedTable with that name exists, a new SharedTable is created with that name and is returned.


local SharedTableRegistry = game:GetService("SharedTableRegistry")
local st = SharedTableRegistry:GetSharedTable("MyData")

매개 변수

name: string

The name of the registered SharedTable.


반환

SetSharedTable

void
병렬 쓰기

Registers the provided SharedTable with the specified name. If the provided SharedTable is nil, any existing SharedTable with the specified name is unregistered.


local SharedTableRegistry = game:GetService("SharedTableRegistry")
-- Register a SharedTable with the name "MyData":
local st = SharedTable.new({1, 2, 3})
SharedTableRegistry:SetSharedTable("MyData", st)
-- Unregister the SharedTable with the name "MyData":
SharedTableRegistry:SetSharedTable("MyData", nil)

매개 변수

name: string

The name of the registered SharedTable.

The SharedTable object to register, or nil to unregister any previously registered SharedTable object.


반환

void

이벤트