_random
: Random |
Signature
Random Meta.XR.MRUtilityKit.AnchorPrefabSpawner._random |
onPrefabSpawned
: UnityEvent |
Signature
UnityEvent Meta.XR.MRUtilityKit.AnchorPrefabSpawner.onPrefabSpawned |
PrefabsToSpawn
: List< AnchorPrefabGroup > |
Signature
List<AnchorPrefabGroup> Meta.XR.MRUtilityKit.AnchorPrefabSpawner.PrefabsToSpawn |
SeedValue
: int |
Signature
int Meta.XR.MRUtilityKit.AnchorPrefabSpawner.SeedValue |
SpawnOnStart
: MRUK.RoomFilter |
Signature
MRUK.RoomFilter Meta.XR.MRUtilityKit.AnchorPrefabSpawner.SpawnOnStart |
AnchorPrefabSpawnerObjects
: Dictionary< MRUKAnchor, GameObject >
[Get] |
Signature
Dictionary<MRUKAnchor, GameObject> Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabSpawnerObjects |
SpawnedPrefabs
: List< GameObject >
[Get] |
Signature
List<GameObject> Meta.XR.MRUtilityKit.AnchorPrefabSpawner.SpawnedPrefabs |
ClearPrefab
(
go
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ClearPrefab(GameObject go) Parameters go: GameObjectReturns void |
ClearPrefab
(
anchorInfo
)
|
Clears the gameobject associated with the anchor.
Useful when receiving an event that a specific anchor has been removed
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ClearPrefab(MRUKAnchor anchorInfo) Parameters Returns void |
ClearPrefabs
(
room
)
|
Clears all the spawned gameobjects from this AnchorPrefabSpawner in the given room.
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ClearPrefabs(MRUKRoom room) Parameters Returns void |
ClearPrefabs
()
|
Clears all the gameobjects created with the PrefabSpawner.
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ClearPrefabs() Returns void |
ReceiveAnchorCreatedEvent
(
anchorInfo
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ReceiveAnchorCreatedEvent(MRUKAnchor anchorInfo) Parameters anchorInfo: MRUKAnchorReturns void |
ReceiveAnchorRemovedCallback
(
anchorInfo
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ReceiveAnchorRemovedCallback(MRUKAnchor anchorInfo) Parameters anchorInfo: MRUKAnchorReturns void |
ReceiveAnchorUpdatedCallback
(
anchorInfo
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ReceiveAnchorUpdatedCallback(MRUKAnchor anchorInfo) Parameters anchorInfo: MRUKAnchorReturns void |
ReceiveCreatedRoom
(
room
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ReceiveCreatedRoom(MRUKRoom room) Parameters room: MRUKRoomReturns void |
ReceiveRemovedRoom
(
room
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.ReceiveRemovedRoom(MRUKRoom room) Parameters room: MRUKRoomReturns void |
RegisterAnchorUpdates
(
room
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.RegisterAnchorUpdates(MRUKRoom room) Parameters room: MRUKRoomReturns void |
SpawnPrefab
(
anchorInfo
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.SpawnPrefab(MRUKAnchor anchorInfo) Parameters anchorInfo: MRUKAnchorReturns void |
SpawnPrefabs
(
clearPrefabs
)
|
Spawns prefabs according to the settings.
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.SpawnPrefabs(bool clearPrefabs=true) Parameters clearPrefabs: bool
Clear already existing prefabs before.
Returns void |
SpawnPrefabs
(
room
, clearPrefabs
)
|
Creates gameobjects for the given room.
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.SpawnPrefabs(MRUKRoom room, bool clearPrefabs=true) Parameters clearPrefabs: bool
clear all before adding them again
Returns void |
UnRegisterAnchorUpdates
(
room
)
|
Signature
virtual void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.UnRegisterAnchorUpdates(MRUKRoom room) Parameters room: MRUKRoomReturns void |
CustomPrefabAlignment
(
anchorVolumeBounds
, prefabBounds
)
|
Aligns a prefab to an anchor's volume, based on custom logic.
This method is intended to be overridden a class that extends AnchorPrefabSpawner with custom logic for aligning a prefab. If not overridden, it throws a NotImplementedException.
Signature
virtual Vector3 Meta.XR.MRUtilityKit.AnchorPrefabSpawner.CustomPrefabAlignment(Bounds anchorVolumeBounds, Bounds? prefabBounds) Parameters anchorVolumeBounds: Bounds
The volume bounds of the anchor.
prefabBounds: Bounds?
The bounds of the prefab.
Returns Vector3
The local position of the prefab defined as the difference between the anchor's pivot and the prefab's pivot.
|
CustomPrefabAlignment
(
anchorPlaneRect
, prefabBounds
)
|
Aligns a prefab to an anchor's plane rect, based on custom logic.
This method is intended to be overridden a class that extends AnchorPrefabSpawner with custom logic for aligning a prefab. If not overridden, it throws a NotImplementedException.
Signature
virtual Vector3 Meta.XR.MRUtilityKit.AnchorPrefabSpawner.CustomPrefabAlignment(Rect anchorPlaneRect, Bounds? prefabBounds) Parameters anchorPlaneRect: Rect
The volume bounds of the anchor.
prefabBounds: Bounds?
The bounds of the prefab.
Returns Vector3
The local position of the prefab defined as the difference between the anchor's pivot and the prefab's pivot.
|
CustomPrefabScaling
(
localScale
)
|
Scales a prefab based on custom logic.
This method is intended to be overridden in a class that extends AnchorPrefabSpawner with custom logic for scaling a prefab. If not overridden, it throws a NotImplementedException.
Signature
virtual Vector3 Meta.XR.MRUtilityKit.AnchorPrefabSpawner.CustomPrefabScaling(Vector3 localScale) Parameters localScale: Vector3
The local scale of the prefab.
Returns Vector3
The scaled local scale of the prefab.
|
CustomPrefabScaling
(
localScale
)
|
Scales a prefab based on custom logic.
This method is intended to be overridden a class that extends AnchorPrefabSpawner with custom logic for scaling a prefab. If not overridden, it throws a NotImplementedException.
Signature
virtual Vector2 Meta.XR.MRUtilityKit.AnchorPrefabSpawner.CustomPrefabScaling(Vector2 localScale) Parameters localScale: Vector2
The local scale of the prefab.
Returns Vector2
The scaled local scale of the prefab.
|
CustomPrefabSelection
(
anchor
, prefabs
)
|
Selects a prefab based on custom logic.
This method is intended to be overridden in a class that extends AnchorPrefabSpawner with custom logic for selecting a prefab. It will be called whenever the PrefabSelection of an AnchorPrefabGroup is set to Custom.
Signature
virtual GameObject Meta.XR.MRUtilityKit.AnchorPrefabSpawner.CustomPrefabSelection(MRUKAnchor anchor, List< GameObject > prefabs) Parameters prefabs: List< GameObject >
The list of prefabs to select from. Can be null.
Returns GameObject
The selected prefab.
|
InitializeRandom
(
seed
)
|
Initializes a new instance of the Random class using the current seed.
Signature
void Meta.XR.MRUtilityKit.AnchorPrefabSpawner.InitializeRandom(ref int seed) Parameters seed: ref intReturns void |
Alignment
: AlignMode |
Signature
AlignMode Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.Alignment |
CalculateFacingDirection
: bool |
Signature
bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.CalculateFacingDirection |
IgnorePrefabSize
: bool |
Signature
bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.IgnorePrefabSize |
Labels
: MRUKAnchor.SceneLabels |
Signature
MRUKAnchor.SceneLabels Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.Labels |
MatchAspectRatio
: bool |
Signature
bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.MatchAspectRatio |
Prefabs
: List< GameObject > |
Signature
List<GameObject> Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.Prefabs |
PrefabSelection
: SelectionMode |
Signature
SelectionMode Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.PrefabSelection |
Scaling
: ScalingMode |
Signature
ScalingMode Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.Scaling |
Equals
(
other
)
|
Signature
bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.Equals(AnchorPrefabGroup other) Parameters other: AnchorPrefabGroupReturns bool |
Equals
(
obj
)
|
Signature
override bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.Equals(object obj) Parameters obj: objectReturns override bool |
GetHashCode
()
|
Signature
override int Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.GetHashCode() Returns override int |
operator!=
(
left
, right
)
|
Signature
static bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.operator!=(AnchorPrefabGroup left, AnchorPrefabGroup right) Parameters left: AnchorPrefabGroupright: AnchorPrefabGroupReturns bool |
operator==
(
left
, right
)
|
Signature
static bool Meta.XR.MRUtilityKit.AnchorPrefabSpawner.AnchorPrefabGroup.operator==(AnchorPrefabGroup left, AnchorPrefabGroup right) Parameters left: AnchorPrefabGroupright: AnchorPrefabGroupReturns bool |
| Member | Description |
|---|---|
Stretch |
Stretch each axis to exactly match the size of the Plane/Volume.
|
UniformScaling |
Scale each axis by the same amount to maintain the correct aspect ratio.
|
UniformXZScale |
Scale the X and Z axes uniformly but the Y scale can be different.
|
NoScaling |
Don't perform any scaling.
|
Custom |
Custom logic, extend this class and override CustomPrefabScaling with your own implementation.
|
| Member | Description |
|---|---|
Automatic |
For volumes align to the base, for planes align to the center.
|
Bottom |
Align the bottom of the prefab with the bottom of the volume or plane.
|
Center |
Align the center of the prefab with the center of the volume or plane.
|
NoAlignment |
Don't add any local offset to the prefab.
|
Custom |
Custom logic, extend this class and override CustomPrefabAlignment with your own implementation.
|
| Member | Description |
|---|---|
Random | |
ClosestSize | |
Custom |
Custom logic, extend this class and override CustomPrefabSelection with your own implementation.
|