Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

UniqueStyleString

struct in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A unique integer-based representation for common strings used in various style algorithms for faster comparison and reduced memory footprint.

Ids may very between consecutive runs and may be regenerated on domain reload.

Static Properties

Property Description
Empty The UniqueStyleString representation of an empty string.
Null The UniqueStyleString representation of a null string.

Properties

Property Description
id An integer representing the underlying string uniquely.
IsEmpty Returns whether this UniqueStyleString represents an empty string.
IsNull Returns whether this UniqueStyleString represents a null string.

Constructors

Constructor Description
UniqueStyleString Creates a new UniqueStyleString from a string.

Public Methods

Method Description
Equals Computes whether or not this UniqueStyleString is identical to the other given UniqueStyleString.
GetHashCode Computes a valid hash code for this UniqueStyleString.
IsNullOrEmpty Returns true if this UniqueStyleString represents either a null or empty string.
IsSame Compares this UniqueStyleString to a given string for equality.
ToString Returns a string value with the same content as the string that was used to obtain this UniqueStyleString.

Static Methods

Method Description
TryGet Attempts to retrieve an existing UniqueStyleString from a string value.

Operators

Operator Description
operator != Computes whether or not this UniqueStyleString is different from the other given UniqueStyleString.
operator == Computes whether or not this UniqueStyleString is identical to the other given UniqueStyleString.