# SFurniture

**成员** 6

|      |                                     |                                                                          |
| ---- | ----------------------------------- | ------------------------------------------------------------------------ |
| 函数 | [StoreCustomData](#storecustomdata) | –                                                                        |
| 函数 | [GetCustomData](#getcustomdata)     | –                                                                        |
| 属性 | [InventoryItemID](#inventoryitemid) | Return the inventory ID of furniture.                                    |
| 属性 | [Floor](#floor)                     | Return an SRoomFloor component of the floor this furniture is placed on. |
| 属性 | [MainCollider](#maincollider)       | –                                                                        |
| 属性 | [GameObject](#gameobject)           | –                                                                        |

## 函数

### StoreCustomData

void StoreCustomData(string key, string value)

参数

| 名称  | 类型   | 默认值 |
| ----- | ------ | ------ |
| key   | string | –      |
| value | string | –      |

返回值

`void`

示例

**Lua**

```lua
Space.Host.ExecutingObject.Furniture.StoreCustomData("AKey", "AValue")

```

### GetCustomData

string GetCustomData(string key)

参数

| 名称 | 类型   | 默认值 |
| ---- | ------ | ------ |
| key  | string | –      |

返回值

`string`

示例

**Lua**

```lua
theValue = Space.Host.ExecutingObject.Furniture.GetCustomData("AKey")

```

## 属性

### InventoryItemID

int InventoryItemID {get; }

Return the inventory ID of furniture.

示例

**Lua**

```lua
inventoryID = Space.Host.ExecutingObject.Furniture.InventoryItemID

```

### Floor

[SRoomFloor](/docs/zh-Hans/scripting/client-scripting-api-reference/components/sroomfloor.md) Floor {get; }

Return an SRoomFloor component of the floor this furniture is placed on.

示例

**Lua**

```lua
sRoomFloor = Space.Host.ExecutingObject.Furniture.Floor

```

### MainCollider

[SCollider](/docs/zh-Hans/scripting/client-scripting-api-reference/components/scollider.md) MainCollider {get; }

示例

**Lua**

```lua
collider = Space.Host.ExecutingObject.Furniture.MainCollider

```

### GameObject

[SGameObject](/docs/zh-Hans/scripting/client-scripting-api-reference/types/sgameobject.md) GameObject {get; }

示例

**Lua**

```lua
theGameObject = Space.Host.ExecutingObject.Furniture.GameObject

```
