Function spawnDetached

  • Resumes the passed thread or function instantly using the engine's scheduler.

    This is equivalent to task.spawn, except the thread is not owned by the calling thread. This means that the thread will continue to run, even if the parent thread belongs to a destroyed UnityObject.

    Type Parameters

    Parameters

    Returns thread

  • Resumes the passed thread or function instantly using the engine's scheduler.

    This is like task.spawn(thread, ...), except it will detach ownership from the parent thread and the thread will continue to run as if it were detached.

    Parameters

    • thread: thread
    • Rest ...args: unknown[]

    Returns thread