docs.unity3d.com
    Show / Hide Table of Contents

    Struct StyleFloat

    Style value that can be either a float or a StyleKeyword.

    Namespace: UnityEngine.UIElements
    Syntax
    public struct StyleFloat : IStyleValue<float>, IEquatable<StyleFloat>

    Constructors

    StyleFloat(Single)

    Creates from either a float or a StyleKeyword.

    Declaration
    public StyleFloat(float v)
    Parameters
    Type Name Description
    Single v

    StyleFloat(StyleKeyword)

    Creates from either a float or a StyleKeyword.

    Declaration
    public StyleFloat(StyleKeyword keyword)
    Parameters
    Type Name Description
    StyleKeyword keyword

    Properties

    keyword

    The style keyword.

    Declaration
    public StyleKeyword keyword { get; set; }
    Property Value
    Type Description
    StyleKeyword

    value

    The float value.

    Declaration
    public float value { get; set; }
    Property Value
    Type Description
    Single

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean

    Equals(StyleFloat)

    Declaration
    public bool Equals(StyleFloat other)
    Parameters
    Type Name Description
    StyleFloat other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    Operators

    Equality(StyleFloat, StyleFloat)

    Declaration
    public static bool operator ==(StyleFloat lhs, StyleFloat rhs)
    Parameters
    Type Name Description
    StyleFloat lhs
    StyleFloat rhs
    Returns
    Type Description
    Boolean

    Implicit(Single to StyleFloat)

    Declaration
    public static implicit operator StyleFloat(float v)
    Parameters
    Type Name Description
    Single v
    Returns
    Type Description
    StyleFloat

    Implicit(StyleKeyword to StyleFloat)

    Declaration
    public static implicit operator StyleFloat(StyleKeyword keyword)
    Parameters
    Type Name Description
    StyleKeyword keyword
    Returns
    Type Description
    StyleFloat

    Inequality(StyleFloat, StyleFloat)

    Declaration
    public static bool operator !=(StyleFloat lhs, StyleFloat rhs)
    Parameters
    Type Name Description
    StyleFloat lhs
    StyleFloat rhs
    Returns
    Type Description
    Boolean
    In This Article
    • Constructors
      • StyleFloat(Single)
      • StyleFloat(StyleKeyword)
    • Properties
      • keyword
      • value
    • Methods
      • Equals(Object)
      • Equals(StyleFloat)
      • GetHashCode()
      • ToString()
    • Operators
      • Equality(StyleFloat, StyleFloat)
      • Implicit(Single to StyleFloat)
      • Implicit(StyleKeyword to StyleFloat)
      • Inequality(StyleFloat, StyleFloat)
    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