DataModelクラス

クラスInstance.newでは作れない日本語解説は準備中

ひとことで言うと

DataModelは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):The root of Roblox's parent-child hierarchy. Its direct children are services, such as Workspace and Lighting, that act as the fundamental components of a Roblox game.

クラスの関係

受け継いでいるクラス:Object → Instance → ServiceProvider → DataModel

プロパティ(12)

名前と書き方説明
CreatorId
DataModel.CreatorId: int64
Describes the ID of the user or group that owns the place.
CreatorType
DataModel.CreatorType: CreatorType
Describes the CreatorType of the place, whether the place is owned by a user or a group.
GameId
DataModel.GameId: int64
Describes the ID of the experience that the place running on the server belongs to.
JobId
DataModel.JobId: string
A unique identifier for the running game server instance.
MatchmakingType
DataModel.MatchmakingType: MatchmakingType
Represents how players in the server are handled by matchmaking.
PlaceId
DataModel.PlaceId: int64
Describes the ID of the place running on the server.
PlaceVersion
DataModel.PlaceVersion: int
Describes the version of the place the server is running on.
PrivateServerId
DataModel.PrivateServerId: string
Describes the private server ID of the server, if the server is a VIP server or a reserved server. VIP servers and reserved servers are the two types of private servers.
PrivateServerOwnerId
DataModel.PrivateServerOwnerId: int64
Describes the Class.Player.UserId|UserId of the Player that owns the private server if the server is VIP.
RunService
DataModel.RunService: RunService
A reference to the RunService service.
ServerRegion
DataModel.ServerRegion: string
The region code of the datacenter hosting the current game server.
Workspace
DataModel.Workspace: Workspace
A reference to the Workspace service.

メソッド(5)

名前と書き方説明
BindToClose
DataModel:BindToClose(function: Function): ()
Binds a function to be called before the server shuts down.
GetJobsInfo
DataModel:GetJobsInfo(): Array
Returns a table containing basic information about the jobs performed by the task scheduler.
IsLoaded
DataModel:IsLoaded(): boolean
Returns true if the client has finished loading the game for the first time.
SetPlaceId
DataModel:SetPlaceId(placeId: int64): ()
Sets the DataModel.PlaceId of the current game instance.
SetUniverseId
DataModel:SetUniverseId(universeId: int64): ()
Sets the DataModel.GameId of the current game instance to the given universeId.

イベント(4)

名前と書き方説明
GraphicsQualityChangeRequest
DataModel.GraphicsQualityChangeRequest(betterQuality: boolean)
Fires when the user prompts and increase or decrease in graphics quality using the hotkeys.
Loaded
DataModel.Loaded()
Fires on the client when the game finishes loading for the first time.
ServerLowMemoryWarning
DataModel.ServerLowMemoryWarning()
Fires on the server when Roblox detects that the server is under memory pressure.
ServerRestartScheduled
DataModel.ServerRestartScheduled(restartTime: DateTime, source: CloseReason, attributes: Dictionary)
Fires on the server when the server has been scheduled to restart. Provides the scheduled restart time, source, and custom attributes.

受け継いでいるメンバー

ServiceProvider から受け継いでいるもの(5)

FindService・GetService・Close・ServiceAdded・ServiceRemoving

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(DataModel)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む