Breakroom is now Sinewave Campus. Book a meeting

SUserRegions

客户端类型
在此类中SubscriptionTier
  1. 属性
  2. SubscriptionTier
  3. NumberOfRegions
  4. UsersPerRegion
  5. FileSize
  6. SubscriptionName
  7. AvailableRegions
成员 6
属性SubscriptionTierThe subscription tier indicates which type of premium memberhsip the player has. (As found in "Region" window)
属性NumberOfRegionsThe number of regions the player has. (As found in "Region" window)
属性UsersPerRegionThe max number of users allowed per region. ("Concurrency" as found in "Region" window).
属性FileSizeThe maximum MB size the player's regions can be. ("Max Region SizE" in the "Region" window)
属性SubscriptionNameThe name of the current player's premium subscription (as found in "Region" window)
属性AvailableRegionsReturns an array of SPublicRegion which is a group of data for each of the user's available regions.

属性​

SubscriptionTier只读​

int SubscriptionTier {get; }

The subscription tier indicates which type of premium memberhsip the player has. (As found in "Region" window)

示例

Lua
--Make's a UIText show this User's Regions' current Subscription Tier

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.SubscriptionTier
text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

NumberOfRegions只读​

int NumberOfRegions {get; }

The number of regions the player has. (As found in "Region" window)

示例

Lua
--Make's a UIText show this User's Regions' current NumberOfRegions

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.NumberOfRegions
text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

UsersPerRegion只读​

int UsersPerRegion {get; }

The max number of users allowed per region. ("Concurrency" as found in "Region" window).

示例

Lua
--Make's a UIText show this User's Regions' current UsersPerRegion

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.UsersPerRegion
text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

FileSize只读​

int FileSize {get; }

The maximum MB size the player's regions can be. ("Max Region SizE" in the "Region" window)

示例

Lua
--Make's a UIText show this User's Regions' current FileSize

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.FileSize
text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

SubscriptionName只读​

string SubscriptionName {get; }

The name of the current player's premium subscription (as found in "Region" window)

示例

Lua
--Make's a UIText show this User's Regions' current SubscriptionName

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.SubscriptionName
text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

AvailableRegions只读​

SPublicRegion[] AvailableRegions {get; }

Returns an array of SPublicRegion which is a group of data for each of the user's available regions.

示例

Lua
--Make's a UIText show the Name of the user's first available region

textObject = Space.Host.GetReference("TheTextReference")

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
textObject.UIText.Text = r.Name
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)