Class ForegroundObjectPlacementRandomizer | Perception | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class ForegroundObjectPlacementRandomizer

    Creates a 2D layer of of evenly spaced GameObjects from a given list of prefabs

    Inheritance
    Object
    Randomizer
    ForegroundObjectPlacementRandomizer
    Inherited Members
    Randomizer.enabled
    Randomizer.scenario
    Randomizer.tagManager
    Randomizer.OnCreate()
    Randomizer.OnScenarioComplete()
    Randomizer.OnStartRunning()
    Randomizer.OnStopRunning()
    Randomizer.OnUpdate()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.Perception.Randomization.Randomizers.SampleRandomizers
    Syntax
    [Serializable]
    [AddRandomizerMenu("Perception/Foreground Object Placement Randomizer")]
    public class ForegroundObjectPlacementRandomizer : Randomizer

    Fields

    depth

    The Z offset component applied to the generated layer of GameObjects

    Declaration
    public float depth
    Field Value
    Type Description
    Single

    placementArea

    The size of the 2D area designated for object placement

    Declaration
    public Vector2 placementArea
    Field Value
    Type Description
    Vector2

    prefabs

    The list of prefabs sample and randomly place

    Declaration
    public GameObjectParameter prefabs
    Field Value
    Type Description
    GameObjectParameter

    separationDistance

    The minimum distance between all placed objects

    Declaration
    public float separationDistance
    Field Value
    Type Description
    Single

    Methods

    OnIterationEnd()

    Deletes generated foreground objects after each scenario iteration is complete

    Declaration
    protected override void OnIterationEnd()
    Overrides
    Randomizer.OnIterationEnd()

    OnIterationStart()

    Generates a foreground layer of objects at the start of each scenario iteration

    Declaration
    protected override void OnIterationStart()
    Overrides
    Randomizer.OnIterationStart()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023