# SPublicRegion

**Members** 13

|          |                               |                                                                     |
| -------- | ----------------------------- | ------------------------------------------------------------------- |
| Property | [ID](#id)                     | The Region ID of this region                                        |
| Property | [OwnerID](#ownerid)           | The ID of the owner of this region                                  |
| Property | [Name](#name)                 | The Name of this region                                             |
| Property | [MapPath](#mappath)           | –                                                                   |
| Property | [PreviewPath](#previewpath)   | –                                                                   |
| Property | [RankingScore](#rankingscore) | The Ranking Score of the region.                                    |
| Property | [MaxAvatars](#maxavatars)     | The max number of avatars this region can hold.                     |
| Property | [FileSize](#filesize)         | The current MBs the region is using.                                |
| Property | [Memory](#memory)             | –                                                                   |
| Property | [Landmarks](#landmarks)       | An array of Landmarks in the region.                                |
| Property | [Regions](#regions)           | Returns an array of SSubRegion in the region.                       |
| Property | [Description](#description)   | Returns the description of the region.                              |
| Property | [Access](#access)             | The access type of the region (such as "Public" or "Approved only") |

## Properties

### ID

int ID {get; }

The Region ID of this region

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### OwnerID

int OwnerID {get; }

The ID of the owner of this region

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### Name

string Name {get; }

The Name of this region

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### MapPath

string MapPath {get; }

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### PreviewPath

string PreviewPath {get; }

Example

**Lua**

```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)

```

### RankingScore

int RankingScore {get; }

The Ranking Score of the region.

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### MaxAvatars

int MaxAvatars {get; }

The max number of avatars this region can hold.

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### FileSize

int FileSize {get; }

The current MBs the region is using.

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### Memory

int Memory {get; }

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### Landmarks

[SLandmark](/docs/scripting/client-scripting-api-reference/types/slandmark.md)\[] 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) \`\`\`

### Regions

[SSubRegion](/docs/scripting/client-scripting-api-reference/types/ssubregion.md)\[] Regions {get; }

Returns an array of [*SSubRegion*](/docs/scripting/client-scripting-api-reference/types/ssubregion.md) in the region.

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### Description

string Description {get; }

Returns the description of the region.

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```

### Access

int Access {get; }

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

Example

**Lua**

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

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

```
