SharedTableRegistry
非推奨を表示
Provides a global registry of named SharedTable objects. It can be used to store SharedTable objects that are used by multiple scripts.
概要
方法
Gets the registered SharedTable with the specified name.
Registers the provided SharedTable with the specified name.
プロパティ
方法
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")
パラメータ
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)
パラメータ
The name of the registered SharedTable.
The SharedTable object to register, or nil to unregister any previously registered SharedTable object.
戻り値
void