Photon Fusion 2.0.3

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
NetworkSceneAsyncOp Struct Reference

A wrapper for async scene operations. More...

Inherits IEnumerator.

Classes

struct  Awaiter
 Awaiter for NetworkSceneAsyncOp More...
 

Public Member Functions

void AddOnCompleted (Action< NetworkSceneAsyncOp > action)
 Adds a callback to be called when the operation is completed More...
 
Awaiter GetAwaiter ()
 Gets the awaiter for the operation More...
 
bool IEnumerator. MoveNext ()
 
void IEnumerator. Reset ()
 

Static Public Member Functions

static NetworkSceneAsyncOp FromAsyncOperation (SceneRef sceneRef, UnityEngine.AsyncOperation asyncOp)
 Creates a NetworkSceneAsyncOp from a UnityEngine.AsyncOperation More...
 
static NetworkSceneAsyncOp FromCompleted (SceneRef sceneRef)
 Creates a completed NetworkSceneAsyncOp More...
 
static NetworkSceneAsyncOp FromCoroutine (SceneRef sceneRef, ICoroutine coroutine)
 Creates a NetworkSceneAsyncOp from a ICoroutine More...
 
static NetworkSceneAsyncOp FromError (SceneRef sceneRef, Exception error)
 Creates a NetworkSceneAsyncOp from a Exception More...
 
static NetworkSceneAsyncOp FromTask (SceneRef sceneRef, Task task)
 Creates a NetworkSceneAsyncOp from a Task More...
 

Public Attributes

readonly SceneRef SceneRef
 The scene reference of the operation More...
 

Properties

object IEnumerator. Current [get]
 
Exception? Error [get]
 Attached error to the operation More...
 
bool IsDone [get]
 Signals if the operation is done More...
 
bool IsValid [get]
 Signals if the operation is valid More...
 

Detailed Description

A wrapper for async scene operations.

Member Function Documentation

◆ AddOnCompleted()

void AddOnCompleted ( Action< NetworkSceneAsyncOp action)

Adds a callback to be called when the operation is completed

Parameters
actionThe callback to be called

◆ FromAsyncOperation()

static NetworkSceneAsyncOp FromAsyncOperation ( SceneRef  sceneRef,
UnityEngine.AsyncOperation  asyncOp 
)
static

Creates a NetworkSceneAsyncOp from a UnityEngine.AsyncOperation

Parameters
sceneRefScene reference
asyncOpAsync operation reference
Returns
Returns a NetworkSceneAsyncOp instance
Exceptions
ArgumentNullExceptionThrown if asyncOp is null

◆ FromCompleted()

static NetworkSceneAsyncOp FromCompleted ( SceneRef  sceneRef)
static

Creates a completed NetworkSceneAsyncOp

Parameters
sceneRefScene reference
Returns
Returns a NetworkSceneAsyncOp instance

◆ FromCoroutine()

static NetworkSceneAsyncOp FromCoroutine ( SceneRef  sceneRef,
ICoroutine  coroutine 
)
static

Creates a NetworkSceneAsyncOp from a ICoroutine

Parameters
sceneRefScene reference
coroutineCoroutine reference
Returns
Returns a NetworkSceneAsyncOp instance
Exceptions
ArgumentNullExceptionThrown if coroutine is null

◆ FromError()

static NetworkSceneAsyncOp FromError ( SceneRef  sceneRef,
Exception  error 
)
static

Creates a NetworkSceneAsyncOp from a Exception

Parameters
sceneRefScene reference
errorException reference
Returns
Returns a NetworkSceneAsyncOp instance
Exceptions
ArgumentNullExceptionThrown if error is null

◆ FromTask()

static NetworkSceneAsyncOp FromTask ( SceneRef  sceneRef,
Task  task 
)
static

Creates a NetworkSceneAsyncOp from a Task

Parameters
sceneRefScene reference
taskTask reference
Returns
Returns a NetworkSceneAsyncOp instance
Exceptions
ArgumentNullExceptionThrown if task is null

◆ GetAwaiter()

Awaiter GetAwaiter ( )

Gets the awaiter for the operation

Member Data Documentation

◆ SceneRef

readonly SceneRef SceneRef

The scene reference of the operation

Property Documentation

◆ Error

Exception? Error
get

Attached error to the operation

◆ IsDone

bool IsDone
get

Signals if the operation is done

◆ IsValid

bool IsValid
get

Signals if the operation is valid