Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SFurniture Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SFurniture:
ScriptClassComponent< RoomFurnitureBaseInternal >

Public Member Functions

void StoreCustomData (string key, string value)
 Set custom key to furniture More...
 
string GetCustomData (string key)
 Get custom data from furniture More...
 

Properties

int InventoryItemID [get]
 Return the inventory ID of furniture. More...
 
SRoomFloor Floor [get]
 Return an SRooomFloor component of the floor this furniture is placed on. More...
 
SCollider MainCollider [get]
 
- Properties inherited from ScriptClassComponent< RoomFurnitureBaseInternal >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

Member Function Documentation

◆ GetCustomData()

string SineSpace.Scripting.Components.SFurniture.GetCustomData ( string  key)

Get custom data from furniture

furniture = Space.Scene.Find(“Cube”).Furniture
&ndash;get the roomfurniture component.
Space.Log(furniture.GetCustomData(“custom key”))
&ndash;get the value from furniture by key.

◆ StoreCustomData()

void SineSpace.Scripting.Components.SFurniture.StoreCustomData ( string  key,
string  value 
)

Set custom key to furniture

furniture = Space.Scene.Find(“Cube”).Furniture
&ndash;get the roomfurniture component on your furniture
furniture.StoreCustomData(“custom key”,”123”)
&ndash;set key and value to the furniture

Property Documentation

◆ Floor

SRoomFloor SineSpace.Scripting.Components.SFurniture.Floor
get

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

◆ InventoryItemID

int SineSpace.Scripting.Components.SFurniture.InventoryItemID
get

Return the inventory ID of furniture.

furniture = Space.Scene.Find(“Cube”).Furniture
&ndash;get the roomfurniture component on your furniture
inventoryId = furniture.InventoryItemID
&ndash;get inventoryid of the furniture
Space.Log(inventoryId)
&ndash;print the inventory id.

◆ MainCollider

SCollider SineSpace.Scripting.Components.SFurniture.MainCollider
get