Breakroom is now Sinewave Campus. Book a meeting

SPublicRegion

ClientTypes
On this classID
  1. Properties
  2. ID
  3. OwnerID
  4. Name
  5. MapPath
  6. PreviewPath
  7. RankingScore
  8. MaxAvatars
  9. FileSize
  10. Memory
  11. Landmarks
  12. Regions
  13. Description
  14. Access
Members 13
PropertyIDThe Region ID of this region
PropertyOwnerIDThe ID of the owner of this region
PropertyNameThe Name of this region
PropertyMapPath–
PropertyPreviewPath–
PropertyRankingScoreThe Ranking Score of the region.
PropertyMaxAvatarsThe max number of avatars this region can hold.
PropertyFileSizeThe current MBs the region is using.
PropertyMemory–
PropertyLandmarksAn array of Landmarks in the region.
PropertyRegionsReturns an array of SSubRegion in the region.
PropertyDescriptionReturns the description of the region.
PropertyAccessThe access type of the region (such as "Public" or "Approved only")

Properties​

IDRead only​

int ID {get; }

The Region ID of this region

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionID = r.ID
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

OwnerIDRead only​

int OwnerID {get; }

The ID of the owner of this region

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionOwnerID = r.OwnerID
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

NameRead only​

string Name {get; }

The Name of this region

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionName = r.Name
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

MapPathRead only​

string MapPath {get; }

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionMapPath = r.MapPath
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

PreviewPathRead only​

string PreviewPath {get; }

Example

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

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

function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionPreviewPath = r.PreviewPath
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

RankingScoreRead only​

int RankingScore {get; }

The Ranking Score of the region.

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionRankingScore = r.RankingScore
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

MaxAvatarsRead only​

int MaxAvatars {get; }

The max number of avatars this region can hold.

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionMaxAvatars = r.MaxAvatars
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

FileSizeRead only​

int FileSize {get; }

The current MBs the region is using.

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionFileSize = r.FileSize
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

MemoryRead only​

int Memory {get; }

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionMemory = r.Memory
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

LandmarksRead only​

SLandmark[] Landmarks {get; }

An array of Landmarks in the region.

Example

``` function GetUserRegionsComplete(SUserRegions) local r = SUserRegions.AvailableRegions[1] regionLandmarks = r.Landmarks end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete) ```

RegionsRead only​

SSubRegion[] Regions {get; }

Returns an array of SSubRegion in the region.

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionSubRegions = r.Regions
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

DescriptionRead only​

string Description {get; }

Returns the description of the region.

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionDescription = r.Description
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

AccessRead only​

int Access {get; }

The access type of the region (such as "Public" or "Approved only")
1= Disabled, 2= FreeForall, 3= FriendsOnly, 4= ApprovedOnly, 5= GroupsOnly

Example

Lua
function GetUserRegionsComplete(SUserRegions)
local r = SUserRegions.AvailableRegions[1]
regionAccessType = r.Access
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)