CheckOverlaps
: bool |
If enabled then the spawn position will be checked to make sure there is no overlap with physics colliders including themselves.
Signature
bool CheckOverlaps |
Labels
: MRUKAnchor.SceneLabels |
When using surface spawning, use this to filter which anchor labels should be included.
Eg, spawn only on TABLE or OTHER.
Signature
MRUKAnchor.SceneLabels Labels |
LayerMask
: LayerMask |
Set the layer(s) for the physics bounding box checks, collisions will be avoided with these layers.
Signature
LayerMask LayerMask |
MaxIterations
: int |
Maximum number of times to attempt spawning/moving an object before giving up.
Signature
int MaxIterations |
OverrideBounds
: float |
Required free space for the object (Set negative to auto-detect using GetPrefabBounds) default to auto-detect.
This value represents the extents of the bounding box
Signature
float OverrideBounds |
SpawnAmount
: int |
Number of SpawnObject(s) to place into the scene per room, only applies to Prefabs.
Signature
int SpawnAmount |
SpawnLocations
: SpawnLocation |
Attach content to scene surfaces.
Signature
SpawnLocation SpawnLocations |
SpawnObject
: GameObject |
Prefab to be placed into the scene, or object in the scene to be moved around.
Signature
GameObject SpawnObject |
SpawnOnStart
: MRUK.RoomFilter |
When the scene data is loaded, this controls what room(s) the prefabs will spawn in.
Signature
MRUK.RoomFilter SpawnOnStart |
SurfaceClearanceDistance
: float |
The clearance distance required in front of the surface in order for it to be considered a valid spawn position.
Signature
float SurfaceClearanceDistance |
SpawnedObjects
: IReadOnlyList< GameObject >
[Get] |
The list containing all the objects instantiated by this component.
Signature
IReadOnlyList<GameObject> SpawnedObjects |
ClearSpawnedPrefabs
()
|
Destroys all the game objects instantiated and clears the SpawnedObjects list.
Signature
void ClearSpawnedPrefabs() Returns void |
StartSpawn
()
|
Starts the spawning process for all rooms.
Signature
void StartSpawn() Returns void |
StartSpawn
(
room
)
|
Starts the spawning process for a specific room.
A maximum of MaxIterations attempts will be made to find a valid spawn position. MRUKRoom.GenerateRandomPositionInRoom and MRUKRoom.GenerateRandomPositionOnSurface are used to generate the positions.
Signature
void StartSpawn(MRUKRoom room) Parameters Returns void |
| Member | Description |
|---|---|
Floating |
Spawn somewhere floating in the free space within the room.
|
AnySurface |
Spawn on any surface (i.e. a combination of all 3 options below)
|
VerticalSurfaces |
Spawn only on vertical surfaces such as walls, windows, wall art, doors, etc...
|
OnTopOfSurfaces |
Spawn on surfaces facing upwards such as ground, top of tables, beds, couches, etc...
|
HangingDown |
Spawn on surfaces facing downwards such as the ceiling.
|