Breakroom is now Sinewave Campus. Book a meeting

SGroupInfo

客户端类型
在此类中ID
  1. 属性
  2. ID
  3. OwnerID
  4. Name
  5. Description
  6. Access
  7. ImageUrl
  8. MaxAvatars
  9. Role
  10. CreateDate
成员 9
属性IDThe ID of the group.
属性OwnerIDThe ID of the group's owner.
属性NameThe name of the group.
属性DescriptionThe description of the group.
属性AccessThe level of access the group has, e.g. public or private.
属性ImageUrlThe URL of the group's image.
属性MaxAvatarsThe max number of members the group can have.
属性RolePlayer's role in this group.
属性CreateDateCreation date of the group.

属性​

ID只读​

int ID {get; }

The ID of the group.

示例

Lua
ID = Space.Groups.GetGroupInfo(350).ID

OwnerID只读​

int OwnerID {get; }

The ID of the group's owner.

示例

Lua
OwnerID = Space.Groups.GetGroupInfo(350).OwnerID
Lua
--Clicking this object will show canvas1 if you are a group's owner
--and will show canvas2 if you are not

thisObject = Space.Host.ExecutingObject

canvas1 = Space.Host.GetReference("canvas1")--Add this object with canvas as reference in Scripting Runtime
canvas2 = Space.Host.GetReference("canvas2")--Add this object with canvas as reference in Scripting Runtime


OnClickFunction = function()

local groupInfo = Space.Groups.GetGroupInfo(350)

if groupInfo.OwnerID == Space.Scene.PlayerAvatar.ID then
canvas1.Active = true
else
canvas2.Active = true
end


end

Name只读​

string Name {get; }

The name of the group.

示例

Lua
Name = Space.Groups.GetGroupInfo(350).Name
Lua
--Clicking this object will show group 355's Name on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()

GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.Name
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)

Description只读​

string Description {get; }

The description of the group.

示例

Lua
Description =Space.Groups.GetGroupInfo(350).Description
Lua
--Clicking this object will show group 355's Description on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()

GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.Description
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)

Access只读​

string Access {get; }

The level of access the group has, e.g. public or private.

示例

Lua
Access = Space.Groups.GetGroupInfo(350).Access
Lua
--Clicking this object will show group 355's Access on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()

GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.Access
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)

ImageUrl只读​

string ImageUrl {get; }

The URL of the group's image.

示例

Lua
ImageUrl = Space.Groups.GetGroupInfo(350).ImageUrl
Lua
--Clicking this object will show group 355's ImageUrl on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()

GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.ImageUrl
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)

MaxAvatars只读​

int MaxAvatars {get; }

The max number of members the group can have.

示例

Lua
MaxAvatars = Space.Groups.GetGroupInfo(350).MaxAvatars
Lua
--Clicking this object will show group 355's MaxAvatars on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()

GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.MaxAvatars
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)

Role只读​

string Role {get; }

Player's role in this group.

示例

Lua
Role = Space.Groups.GetGroupInfo(350).Role
Lua
--Clicking this object will show canvas1 if you are a VIP in the group
--and will show canvas2 if you are a regular member
--and will show canvas3 if you are the group owner

thisObject = Space.Host.ExecutingObject

canvas1 = Space.Host.GetReference("canvas1")--Add this object with canvas as reference in Scripting Runtime
canvas2 = Space.Host.GetReference("canvas2")--Add this object with canvas as reference in Scripting Runtime
canvas3 = Space.Host.GetReference("canvas3")--Add this object with canvas as reference in Scripting Runtime

OnClickFunction = function()

local groupInfo = Space.Groups.GetGroupInfo(350)

if groupInfo.Role == "Owner" then
canvas3.Active = true
elseif groupInfo.Role == "VIP" then
canvas1.Active = true
elseif groupInfo.Role == "Normal" then
canvas2.Active = true
end

end

CreateDate只读​

string CreateDate {get; }

Creation date of the group.

示例

Lua
CreateDate = Space.Groups.GetGroupInfo(350).CreateDate
Lua
--Clicking this object will show group 355's creation date on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()

CreateDate = Space.Groups.GetGroupInfo(350).CreateDate

uiText.Text = CreateDate
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)