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.

Attempting to represent a null string with this structure has an undefined behavior and may throw exceptions.

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

Properties

Property Description
id An integer representing the underlying string uniquely.
value A string value that's equal to the string that was used to obtain this UniqueStyleString.

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.

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.
string Converts a UniqueStyleString to string.
UniqueStyleString Converts a string to UniqueStyleString.