docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateTextFragment

    CreateTextFragment(string, 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.

    Declaration
    public WritableMessageFragment CreateTextFragment(string original, int start, int end)
    Parameters
    Type Name Description
    string original

    Original string

    int start

    Sub string start

    int end

    Sub string end

    Returns
    Type Description
    WritableMessageFragment

    A new fragment.

    CreateTextFragment(string)

    Creates a new WritableMessageFragment which represents a string. 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 WritableMessageFragment CreateTextFragment(string original)
    Parameters
    Type Name Description
    string original

    The source string.

    Returns
    Type Description
    WritableMessageFragment

    A new 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)