docs.unity3d.com
    Show / Hide Table of Contents

    Struct VisualElementStyleSheetSet

    This structure manipulates the set of StyleSheet objects attached to the owner VisualElement.

    Namespace: UnityEngine.UIElements
    Syntax
    public struct VisualElementStyleSheetSet : IEquatable<VisualElementStyleSheetSet>
    Remarks

    VisualElementStyleSheetSet instances can't be created directly. Use the styleSheets property accessor to work with the style sheets of an element.

    Properties

    count

    Number of style sheets attached to the owner element.

    Declaration
    public int count { get; }
    Property Value
    Type Description
    Int32

    Item[Int32]

    Reads the value at the specified index in the list of StyleSheet objects attached of the element

    Declaration
    public StyleSheet this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index

    The index of the StyleSheet

    Property Value
    Type Description
    StyleSheet

    Methods

    Add(StyleSheet)

    Adds a style sheet for the owner element.

    Declaration
    public void Add(StyleSheet styleSheet)
    Parameters
    Type Name Description
    StyleSheet styleSheet

    Clear()

    Removes all style sheets for the owner element.

    Declaration
    public void Clear()

    Contains(StyleSheet)

    Looks for the specified StyleSheet

    Declaration
    public bool Contains(StyleSheet styleSheet)
    Parameters
    Type Name Description
    StyleSheet styleSheet
    Returns
    Type Description
    Boolean

    Returns true if the style sheet is attached to the owner element, false otherwise.

    Equals(Object)

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

    Equals(VisualElementStyleSheetSet)

    Compares instances of the VisualElementStyleSheetSet struct for equality.

    Declaration
    public bool Equals(VisualElementStyleSheetSet other)
    Parameters
    Type Name Description
    VisualElementStyleSheetSet other

    The structure to compare with.

    Returns
    Type Description
    Boolean

    Returns true if the two instances refer to the same element, false otherwise.

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Remove(StyleSheet)

    Removes a style sheet for the owner element.

    Declaration
    public bool Remove(StyleSheet styleSheet)
    Parameters
    Type Name Description
    StyleSheet styleSheet
    Returns
    Type Description
    Boolean

    Operators

    Equality(VisualElementStyleSheetSet, VisualElementStyleSheetSet)

    Compares instances of the VisualElementStyleSheetSet struct for equality.

    Declaration
    public static bool operator ==(VisualElementStyleSheetSet left, VisualElementStyleSheetSet right)
    Parameters
    Type Name Description
    VisualElementStyleSheetSet left

    The left operand of the comparison

    VisualElementStyleSheetSet right

    The right operand of the comparison

    Returns
    Type Description
    Boolean

    True if the two instances refer to the same element, false otherwise.

    Inequality(VisualElementStyleSheetSet, VisualElementStyleSheetSet)

    Compares instances of the VisualElementStyleSheetSet struct for inequality.

    Declaration
    public static bool operator !=(VisualElementStyleSheetSet left, VisualElementStyleSheetSet right)
    Parameters
    Type Name Description
    VisualElementStyleSheetSet left

    The left operand of the comparison

    VisualElementStyleSheetSet right

    The right operand of the comparison

    Returns
    Type Description
    Boolean

    Returns false if the two instances refer to the same element, true otherwise.

    In This Article
    • Properties
      • count
      • Item[Int32]
    • Methods
      • Add(StyleSheet)
      • Clear()
      • Contains(StyleSheet)
      • Equals(Object)
      • Equals(VisualElementStyleSheetSet)
      • GetHashCode()
      • Remove(StyleSheet)
    • Operators
      • Equality(VisualElementStyleSheetSet, VisualElementStyleSheetSet)
      • Inequality(VisualElementStyleSheetSet, VisualElementStyleSheetSet)
    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