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

    Class Randomizer

    Derive Randomizer to implement systems that randomize GameObjects and/or simulation properties.

    Inheritance
    Object
    Randomizer
    BackgroundObjectPlacementRandomizer
    ColorRandomizer
    ForegroundObjectPlacementRandomizer
    HueOffsetRandomizer
    RotationRandomizer
    SunAngleRandomizer
    TextureRandomizer
    Inherited Members
    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
    Syntax
    [Serializable]
    public abstract class Randomizer

    Properties

    enabled

    Enabled Randomizers are updated, disabled Randomizers are not.

    Declaration
    public bool enabled { get; set; }
    Property Value
    Type Description
    Boolean

    scenario

    Returns the scenario containing this Randomizer

    Declaration
    public ScenarioBase scenario { get; }
    Property Value
    Type Description
    ScenarioBase

    tagManager

    Retrieves the RandomizerTagManager of the scenario containing this Randomizer

    Declaration
    public RandomizerTagManager tagManager { get; }
    Property Value
    Type Description
    RandomizerTagManager

    Methods

    OnCreate()

    OnCreate is called when the Randomizer is added or loaded to a scenario

    Declaration
    protected virtual void OnCreate()

    OnIterationEnd()

    OnIterationEnd is called the after a scenario iteration has completed

    Declaration
    protected virtual void OnIterationEnd()

    OnIterationStart()

    OnIterationStart is called at the start of a new scenario iteration

    Declaration
    protected virtual void OnIterationStart()

    OnScenarioComplete()

    OnScenarioComplete is called the after the entire scenario has completed

    Declaration
    protected virtual void OnScenarioComplete()

    OnStartRunning()

    OnStartRunning is called on the first frame a Randomizer is enabled

    Declaration
    protected virtual void OnStartRunning()

    OnStopRunning()

    OnStartRunning is called on the first frame a disabled Randomizer is updated

    Declaration
    protected virtual void OnStopRunning()

    OnUpdate()

    OnUpdate is executed every frame for enabled Randomizers

    Declaration
    protected virtual void OnUpdate()
    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