docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    Assembly: Unity.Localization.dll
    Syntax
    public abstract class MessageFragment

    Fields

    Name Description
    m_EndIndex

    The end index for this fragment from m_OriginalString.

    m_OriginalString

    The original string being parsed.

    m_StartIndex

    The start index for this fragment from m_OriginalString.

    Properties

    Name Description
    this[int]

    Returns the char at the specified index.

    Length

    Total length of the fragment.

    Message

    The message the fragment is part of.

    Methods

    Name Description
    CreateReadonlyTextFragment(int, int)

    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.

    CreateTextFragment(int, int)

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)