Class BackgroundObjectPlacementRandomizer
Creates multiple layers of evenly distributed but randomly placed objects
Inherited Members
Namespace: UnityEngine.Experimental.Perception.Randomization.Randomizers.SampleRandomizers
Syntax
[Serializable]
[AddRandomizerMenu("Perception/Background Object Placement Randomizer")]
public class BackgroundObjectPlacementRandomizer : Randomizer
Fields
depth
The Z offset component applied to all generated background layers
Declaration
public float depth
Field Value
Type | Description |
---|---|
Single |
layerCount
The number of background layers to generate
Declaration
public int layerCount
Field Value
Type | Description |
---|---|
Int32 |
placementArea
The 2D size of the generated background layers
Declaration
public Vector2 placementArea
Field Value
Type | Description |
---|---|
Vector2 |
prefabs
A categorical parameter for sampling random prefabs to place
Declaration
public GameObjectParameter prefabs
Field Value
Type | Description |
---|---|
GameObjectParameter |
separationDistance
The minimum distance between placed background objects
Declaration
public float separationDistance
Field Value
Type | Description |
---|---|
Single |
Methods
OnIterationEnd()
Deletes generated background objects after each scenario iteration is complete
Declaration
protected override void OnIterationEnd()
Overrides
OnIterationStart()
Generates background layers of objects at the start of each scenario iteration
Declaration
protected override void OnIterationStart()