docs.unity3d.com
    Show / Hide Table of Contents

    Class PlaneSizeCondition

    Represents a situation where a given plane must have a size within a certain range

    Inheritance
    Object
    ConditionBase
    Condition
    Condition<Vector2>
    BoundedRangeCondition<Vector2>
    PlaneSizeCondition
    Inherited Members
    BoundedRangeCondition<Vector2>.m_MinBounded
    BoundedRangeCondition<Vector2>.m_MaxBounded
    BoundedRangeCondition<Vector2>.m_RatingConfig
    BoundedRangeCondition<Vector2>.ratingConfig
    BoundedRangeCondition<Vector2>.minBounded
    BoundedRangeCondition<Vector2>.maxBounded
    BoundedRangeCondition<Vector2>.OnRatingConfigChange()
    BoundedRangeCondition<Vector2>.ScaleParameters(Single)
    Condition.traitName
    ConditionBase.proxy
    ConditionBase.drawWarning
    Namespace: Unity.MARS.Conditions
    Syntax
    public class PlaneSizeCondition : BoundedRangeCondition<Vector2>, ISimulatable, ICondition<Vector2>, ICondition, IConditionBase, IRequiresTraits<Vector2>, IRequiresTraits, IConfigurableMatchRating, IRangeBoundingOptions, ISpatialCondition, ICreateFromData, IAdjustableComponent

    Properties

    Adjusting

    Whether the component is in the adjusting state

    Declaration
    public bool Adjusting { get; set; }
    Property Value
    Type Description
    Boolean
    Implements
    IAdjustableComponent.Adjusting

    maximumSize

    Maximum size of the plane's extents

    Declaration
    public Vector2 maximumSize { get; set; }
    Property Value
    Type Description
    Vector2

    minimumSize

    Minimum size of the plane's extents

    Declaration
    public Vector2 minimumSize { get; set; }
    Property Value
    Type Description
    Vector2

    noMinMaxWarning

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

    smallMinMaxRangeWarning

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

    Methods

    FormatDataString(TraitDataSnapshot)

    Formats data into a string that is human-readable and appropriate for the condition

    Declaration
    public string FormatDataString(TraitDataSnapshot data)
    Parameters
    Type Name Description
    TraitDataSnapshot data

    The data

    Returns
    Type Description
    String

    The formatted string

    Implements
    ICreateFromData.FormatDataString(TraitDataSnapshot)

    GetConditionRatingForData(TraitDataSnapshot)

    Return the rating this condition has for the given data snapshot

    Declaration
    public float GetConditionRatingForData(TraitDataSnapshot data)
    Parameters
    Type Name Description
    TraitDataSnapshot data

    The data

    Returns
    Type Description
    Single

    The result of the condition's data rate matching method

    Implements
    ICreateFromData.GetConditionRatingForData(TraitDataSnapshot)

    GetRequiredTraits()

    Get the TraitRequirements that are required by this object

    Declaration
    public override TraitRequirement[] GetRequiredTraits()
    Returns
    Type Description
    TraitRequirement[]

    The required traits

    Overrides
    Condition.GetRequiredTraits()

    IncludeData(TraitDataSnapshot)

    Declaration
    public void IncludeData(TraitDataSnapshot data)
    Parameters
    Type Name Description
    TraitDataSnapshot data
    Implements
    ICreateFromData.IncludeData(TraitDataSnapshot)

    OnEnable()

    Declaration
    public void OnEnable()

    OnValidate()

    Declaration
    public override void OnValidate()
    Overrides
    ConditionBase.OnValidate()

    OptimizeForData(TraitDataSnapshot)

    Modifies the properties so that the data is the optimal data for this condition

    Declaration
    public void OptimizeForData(TraitDataSnapshot data)
    Parameters
    Type Name Description
    TraitDataSnapshot data

    The data that should be optimal for the condition after this method is called

    Implements
    ICreateFromData.OptimizeForData(TraitDataSnapshot)

    RateDataMatch(ref Vector2)

    Describe how well a given piece of data matches a condition. 0 means the match is unacceptable, 1 means a perfect match

    Declaration
    public override float RateDataMatch(ref Vector2 data)
    Parameters
    Type Name Description
    Vector2 data
    Returns
    Type Description
    Single

    A number from 0 to 1 indicating how well a piece of data watches this condition

    Overrides
    Unity.MARS.Condition<Vector2>.RateDataMatch(Vector2)

    Reset()

    Declaration
    public void Reset()

    Events

    AdjustingChanged

    Invoked when the adjusting state changes. Passes the new adjusting state.

    Declaration
    public event Action<bool> AdjustingChanged
    Event Type
    Type Description
    Action<Boolean>
    Implements
    IAdjustableComponent.AdjustingChanged

    HandleChanged

    Declaration
    public event Action HandleChanged
    Event Type
    Type Description
    Action

    HandleChangeEnded

    Declaration
    public event Action HandleChangeEnded
    Event Type
    Type Description
    Action

    Extension Methods

    IRequiresTraitsMethods.TryGetTraitValue<T>(IRequiresTraits<T>, Int32, String, out T)
    IRequiresTraitsMethods.TryGetAllTraitsWithSemanticTag<T>(IRequiresTraits<T>, String, String, out Dictionary<Int32, T>)
    IRequiresTraitsMethods.ForEachContextIdWithTrait<T>(IRequiresTraits<T>, String, Action<Int32>)
    IConditionGenericMethods.PassesCondition<T>(ICondition<T>, ref T)
    Back to top
    Terms of use
    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