Search Results for

    Show / Hide Table of Contents

    Class PasteManager

    Provides paste functionality to WebGL builds via a singleton manager. This class automatically sets itself up in WebGL to handle text paste events, allowing them to be inserted into Unity's UnityEngine.UI.InputField components.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    PasteManager
    Namespace: TriLibCore.Samples
    Assembly: TriLibCore.Samples.dll
    Syntax
    public class PasteManager : MonoBehaviour

    Properties

    Instance

    Gets the PasteManager singleton instance. If no instance is found in the scene, one will be created automatically.

    Declaration
    public static PasteManager Instance { get; }
    Property Value
    Type Description
    PasteManager

    Methods

    CheckInstance()

    Checks if a PasteManager instance already exists. If none is found, a new GameObject with a PasteManager is created.

    Declaration
    public static void CheckInstance()

    Paste(string)

    Called when the user pastes the specified text within the WebGL build. Inserts the pasted text into a currently selected UnityEngine.UI.InputField, if available.

    Declaration
    public void Paste(string value)
    Parameters
    Type Name Description
    string value

    The text value that was pasted.

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top TriLib documentation