docs.unity3d.com
    目次を表示する/隠す

    Class MessageFragment

    A message fragment represents part of a Message. A Message can be broken into multiple WritableMessageFragment and ReadOnlyMessageFragment fragments.

    Inheritance
    Object
    MessageFragment
    ReadOnlyMessageFragment
    WritableMessageFragment
    Namespace: UnityEngine.Localization.Pseudo
    Syntax
    public abstract class MessageFragment

    Fields

    m_EndIndex

    The end index for this fragment from m_OriginalString.

    Declaration
    protected int m_EndIndex
    Field Value
    Type Description
    Int32

    m_OriginalString

    The original string being parsed.

    Declaration
    protected string m_OriginalString
    Field Value
    Type Description
    String

    m_StartIndex

    The start index for this fragment from m_OriginalString.

    Declaration
    protected int m_StartIndex
    Field Value
    Type Description
    Int32

    Properties

    Item[Int32]

    Returns the char at the specified index.

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

    The index of the char to return from m_OriginalString.

    Property Value
    Type Description
    Char

    Length

    Total length of the fragment.

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

    Message

    The message the fragment is part of.

    Declaration
    public Message Message { get; }
    Property Value
    Type Description
    Message

    Methods

    CreateReadonlyTextFragment(Int32, Int32)

    Creates a ReadOnlyMessageFragment which represents a sub string of the original that should be preserved and not modified by any other pseudo methods. Fragments are created using an ObjectPool so they can be reused. Use ReleaseFragment(MessageFragment) to return the fragment or allow the Message to handle returning the fragment if it is part of Fragments.

    Declaration
    public ReadOnlyMessageFragment CreateReadonlyTextFragment(int start, int end)
    Parameters
    Type Name Description
    Int32 start
    Int32 end
    Returns
    Type Description
    ReadOnlyMessageFragment

    A new fragment.

    CreateTextFragment(Int32, Int32)

    Creates a new WritableMessageFragment which represents a sub string of the original. Fragments are created using an ObjectPool so they can be reused. Use ReleaseFragment(MessageFragment) to return the fragment.

    Declaration
    public WritableMessageFragment CreateTextFragment(int start, int end)
    Parameters
    Type Name Description
    Int32 start
    Int32 end
    Returns
    Type Description
    WritableMessageFragment

    A new fragment.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)