Class InteriorBuilder
Fluent builder for creating interior furnishings and decorations using Schedule 1 assets Based on patterns from PetShopSpawner interior system
public class InteriorBuilder
- Inheritance
-
InteriorBuilder
- Inherited Members
Constructors
InteriorBuilder(string)
Create a new interior builder
public InteriorBuilder(string name = "Interior")
Parameters
namestringName for the interior container
InteriorBuilder(Transform, string)
Create a new interior builder with a parent transform
public InteriorBuilder(Transform parent, string name = "Interior")
Parameters
parentTransformParent transform to attach furniture to
namestringName for the interior container
Methods
AddArmchair(Vector3, Quaternion?)
Add an armchair to the interior using S1 armchair mesh
public InteriorBuilder AddArmchair(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddBarrel(Vector3, Quaternion?)
Add a barrel using S1 barrel mesh
public InteriorBuilder AddBarrel(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddBed(Vector3, Quaternion?)
Add a bed to the interior using S1 bed mesh
public InteriorBuilder AddBed(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddBench(Vector3, Quaternion?)
Add a bench to the interior using S1 bench mesh
public InteriorBuilder AddBench(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddBin(Vector3, Quaternion?)
Add a bin/trash can using S1 bin mesh
public InteriorBuilder AddBin(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddBox(Vector3, Quaternion?)
Add a decorative box/crate using S1 box mesh
public InteriorBuilder AddBox(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddCabinet(Vector3, Quaternion?)
Add a cabinet using S1 cabinet mesh
public InteriorBuilder AddCabinet(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddChair(Vector3, Quaternion?)
Add a chair to the interior using S1 chair mesh
public InteriorBuilder AddChair(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddClock(Vector3, Quaternion?)
Add a clock using S1 clock mesh
public InteriorBuilder AddClock(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddComputer(Vector3, Quaternion?)
Add a computer using S1 computer mesh
public InteriorBuilder AddComputer(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddCustomMesh(MeshRef, string, Vector3, Quaternion?)
Add a custom S1 mesh to the interior
public InteriorBuilder AddCustomMesh(MeshRef meshRef, string name, Vector3 position, Quaternion? rotation = null)
Parameters
meshRefMeshRefThe S1 MeshRef to instantiate
namestringName for the GameObject
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddCustomObject(GameObject, Vector3)
Add a custom GameObject to the interior
public InteriorBuilder AddCustomObject(GameObject gameObject, Vector3 position)
Parameters
gameObjectGameObjectThe GameObject to add
positionVector3Local position
Returns
AddDesk(Vector3, Quaternion?)
Add a desk/counter to the interior using S1 desk mesh
public InteriorBuilder AddDesk(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddDrawer(Vector3, Quaternion?)
Add a drawer using S1 drawer mesh
public InteriorBuilder AddDrawer(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddFridge(Vector3, Quaternion?)
Add a fridge to the interior using S1 fridge mesh
public InteriorBuilder AddFridge(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddLocker(Vector3, Quaternion?)
Add a locker to the interior using S1 locker shelf mesh
public InteriorBuilder AddLocker(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddOfficeTable(Vector3, Quaternion?)
Add an office table to the interior using S1 office table mesh
public InteriorBuilder AddOfficeTable(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddPainting(Vector3, Quaternion?)
Add a painting decoration using S1 paintings mesh
public InteriorBuilder AddPainting(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddPlant(Vector3, Quaternion?)
Add a plant decoration using S1 plant mesh
public InteriorBuilder AddPlant(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddPlanter(Vector3, Quaternion?)
Add a planter using S1 planter mesh
public InteriorBuilder AddPlanter(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddPrefab(PrefabRef, Vector3, Quaternion?, bool, bool, Action<GameObject>?)
Add a prefab using PrefabPlacer pattern for networked/functional objects
public InteriorBuilder AddPrefab(PrefabRef prefab, Vector3 position, Quaternion? rotation = null, bool networked = false, bool enableComponents = true, Action<GameObject>? onCreated = null)
Parameters
prefabPrefabRefThe prefab reference to instantiate
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
networkedboolWhether this should be a networked object
enableComponentsboolWhether to enable components on the prefab
onCreatedAction<GameObject>Optional callback after creation
Returns
AddSafe(Vector3, Quaternion?)
Add a safe using S1 safe mesh
public InteriorBuilder AddSafe(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddScreen(Vector3, Quaternion?)
Add a screen/monitor using S1 screen mesh
public InteriorBuilder AddScreen(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddTable(Vector3, Quaternion?)
Add a table to the interior using S1 coffee table mesh
public InteriorBuilder AddTable(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddToilet(Vector3, Quaternion?)
Add a toilet using S1 toilet mesh
public InteriorBuilder AddToilet(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddVase(Vector3, Quaternion?)
Add a vase decoration using S1 vase mesh
public InteriorBuilder AddVase(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
AddWallClock(Vector3, Quaternion?)
Add a wall clock using S1 wall clock mesh
public InteriorBuilder AddWallClock(Vector3 position, Quaternion? rotation = null)
Parameters
positionVector3Local position
rotationQuaternion?Rotation (defaults to identity)
Returns
Build()
Build the interior using the parent transform set in constructor
public GameObject[] Build()
Returns
- GameObject[]
Array of created furniture GameObjects
Build(GameObject)
Build the interior and attach all furniture to the parent
public GameObject[] Build(GameObject parent)
Parameters
parentGameObjectParent GameObject to attach furniture to (overrides constructor parent)
Returns
- GameObject[]
Array of created furniture GameObjects
GetFurniture()
Get all furniture objects without building
public GameObject[] GetFurniture()
Returns
- GameObject[]
SetParent(Transform)
Set the parent transform for all future furniture placements
public InteriorBuilder SetParent(Transform parent)
Parameters
parentTransformParent transform