Statsクラス

クラスサービス(game:GetService("Stats")で取り出す)Instance.newでは作れない日本語解説は準備中

ひとことで言うと

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

公式の説明(英語):Performance metrics for a game.

クラスの関係

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

プロパティ(22)

名前と書き方説明
ContactsCount
Stats.ContactsCount: int
A measurement of how many parts are currently in contact with one another.
DataReceiveKbps
Stats.DataReceiveKbps: float
In a networked game, this describes roughly how many kilobytes of data are being received by the current instance, per second.
DataSendKbps
Stats.DataSendKbps: float
In a networked game, this describes roughly how many kilobytes of data are being sent by the current instance, per second.
FrameTime
Stats.FrameTime: float
A measurement of how long it takes for the engine to process all tasks required to render a frame.
HeartbeatTime
Stats.HeartbeatTime: float
A measurement of the total amount of time it takes for the server to update its task scheduler jobs in seconds.
InstanceCount
Stats.InstanceCount: int
A measurement of how many Instance are currently in memory.
MemoryTrackingEnabled
Stats.MemoryTrackingEnabled: boolean
An indication of whether memory tracking is enabled. This is guaranteed to be unchanged until the next time the Client is started.
MovingPrimitivesCount
Stats.MovingPrimitivesCount: int
A measurement of how many physically simulated components are currently moving in the game world.
PhysicsReceiveKbps
Stats.PhysicsReceiveKbps: float
In a networked game, this describes roughly how many kilobytes of physics data are being received by the current instance, per second.
PhysicsSendKbps
Stats.PhysicsSendKbps: float
In a networked game, this describes roughly how many kilobytes of physics data are being sent by the current instance, per second.
PhysicsStepTime
Stats.PhysicsStepTime: float
A measurement of how long it takes for the physics engine to update its current state.
PrimitivesCount
Stats.PrimitivesCount: int
A measurement of how many physically simulated components currently exist in the game world.
RenderCPUFrameTime
Stats.RenderCPUFrameTime: float
A measurement of how long it takes for the CPU to process all of its rendering tasks for a frame.
RenderGPUFrameTime
Stats.RenderGPUFrameTime: float
A measurement of how long it takes for the GPU to process all of its tasks required to render a frame.
SceneDrawcallCount
Stats.SceneDrawcallCount: int
A measurement of the number of draw calls made by the game's current scene.
SceneTriangleCount
Stats.SceneTriangleCount: int
A measurement of the number of triangles rendered by the game's current scene.
ShadowsDrawcallCount
Stats.ShadowsDrawcallCount: int
A measurement of the number of draw calls being made for shadows by the game's current scene.
ShadowsTriangleCount
Stats.ShadowsTriangleCount: int
A measurement of the number of triangles rendered as shadows in the game's current scene.
UI2DDrawcallCount
Stats.UI2DDrawcallCount: int
A measurement of the number of 2D draw calls made for UI elements in the game's current scene.
UI2DTriangleCount
Stats.UI2DTriangleCount: int
A measurement of the number of triangles that are being rendered for 2D UI elements in the game's current scene.
UI3DDrawcallCount
Stats.UI3DDrawcallCount: int
A measurement of the number of 3D draw calls made for UI elements in the game's current scene.
UI3DTriangleCount
Stats.UI3DTriangleCount: int
A measurement of the number of triangles being rendered for 3D UI elements in the game's current scene.

メソッド(7)

名前と書き方説明
GetHarmonyQualityLevel
Stats:GetHarmonyQualityLevel(): int
Internal-only. Returns the engine's current dynamic-quality level as a score normalized from 0 to 100.
GetMemoryCategoryNames
Stats:GetMemoryCategoryNames(): Array
Internal-only. Returns an array of the names of every developer memory category the engine tracks.
GetMemoryUsageMbAllCategories
Stats:GetMemoryUsageMbAllCategories(): Array
Returns the number of megabytes that are being consumed by all available categories, or an empty array if Class.Stats.MemoryTrackingEnabled|MemoryTrackingEnabled is false.
GetMemoryUsageMbForTag
Stats:GetMemoryUsageMbForTag(tag: DeveloperMemoryTag): float
Returns the number of megabytes that are being consumed in the specified DeveloperMemoryTag category, or 0 if Class.Stats.MemoryTrackingEnabled|MemoryTrackingEnabled is false.
GetTotalMemoryUsageMb
Stats:GetTotalMemoryUsageMb(): float
Returns the total amount of memory being consumed by the current game session, in megabytes.
ResetHarmonyMemoryTarget
Stats:ResetHarmonyMemoryTarget(): ()
Internal-only. Restores the performance-control system's memory budget to the values in effect before Class.Stats:SetHarmonyMemoryTarget() was called.
SetHarmonyMemoryTarget
Stats:SetHarmonyMemoryTarget(targetMB: int): ()
Internal-only. Overrides the performance-control system's memory budget with a target value, in megabytes, for testing.

受け継いでいるメンバー

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(Stats)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

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