Class MessageFragment
A message fragment represents part of a Message. A Message can be broken into multiple WritableMessageFragment and ReadOnlyMessageFragment fragments.
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. |