Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

Selector

class in Unity.SmartStrings.Core.Parsing

/

Inherits from:Unity.SmartStrings.Core.Parsing.FormatItem

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

Represents a single selector in a Placeholder. E.g.: {selector0.selector1?.selector2}, while "." and "?." and "?[]" are operators.

Properties

Property Description
Operator Gets the operator characters.
SelectorIndex The index of the selector in a multi-part selector. Example: {Person.Birthday.Year} has 3 selectors, and Year has a SelectorIndex of 2.

Public Methods

Method Description
Clear Clears the Selector. This method gets called by Unity.SmartStrings.Pooling.SmartPools.SelectorPool when it releases an instance.
Initialize Initializes this Selector instance.

Inherited Members

Properties

PropertyDescription
BaseString Gets the base format string.
EndIndex The end index is pointing to ONE POSITION AFTER the last character of item.
Length Gets the result of FormatItem.EndIndex minus FormatItem.StartIndex.
ParentFormatItem The parent FormatItem of this instance, null if no parent exists.
RawText Retrieves the raw text that this item represents.
SmartSettings The settings for formatter and parser.
StartIndex The start index is pointing to the first character of item.

Public Methods

MethodDescription
AsSpan Gets the ReadOnlySpan_1 representation of this FormatItem.
ToString Gets the string representation of this FormatItem.

Protected Methods

MethodDescription
Initialize Initializes the FormatItem or the derived class.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961