Table of Contents

DestroyWith Method

DestroyWith(IDisposable, CancellationToken)

public static IDisposable DestroyWith(this IDisposable obj, CancellationToken token)

Bind disposable lifetime to cancellation token.

Parameters

obj IDisposable
token CancellationToken

Returns

IDisposable

DestroyWith(IDisposable, SceneLifetime)

public static IDisposable DestroyWith(this IDisposable obj, SceneLifetime scene)

Bind disposable lifetime to unity scene.

Parameters

obj IDisposable
scene SceneLifetime

Returns

IDisposable

DestroyWith(IDisposable, LifecycleBehaviour)

public static IDisposable DestroyWith(this IDisposable obj, LifecycleBehaviour owner)

Bind disposable lifetime to lifecycle owner.

Parameters

obj IDisposable
owner LifecycleBehaviour

Returns

IDisposable

DestroyWith(IDisposable, MonoBehaviour)

public static IDisposable DestroyWith(this IDisposable obj, MonoBehaviour mono)

Bind disposable lifetime to MonoBehaviour.

Parameters

obj IDisposable
mono MonoBehaviour

Returns

IDisposable

DestroyWith(Transform, MonoBehaviour) Obsolete

[Obsolete("UnityEngine.Transform is not supported to be disposed.", true)]
public static void DestroyWith(this Transform _, MonoBehaviour m)

Parameters

_ Transform
m MonoBehaviour

DestroyWith(Transform, SceneLifetime) Obsolete

[Obsolete("UnityEngine.Transform is not supported to be disposed.", true)]
public static void DestroyWith(this Transform _, SceneLifetime s)

Parameters

_ Transform
s SceneLifetime

DestroyWith(Transform, CancellationToken) Obsolete

[Obsolete("UnityEngine.Transform is not supported to be disposed.", true)]
public static void DestroyWith(this Transform _, CancellationToken c)

Parameters

_ Transform
c CancellationToken

DestroyWith(Transform, LifecycleBehaviour) Obsolete

[Obsolete("UnityEngine.Transform is not supported to be disposed.", true)]
public static void DestroyWith(this Transform _, LifecycleBehaviour l)

Parameters

_ Transform
l LifecycleBehaviour

DestroyWith(GameObject, CancellationToken)

public static IDisposable DestroyWith(this GameObject obj, CancellationToken token)

Bind GameObject lifetime to cancellation token.

Parameters

obj GameObject
token CancellationToken

Returns

IDisposable

DestroyWith(GameObject, SceneLifetime)

public static IDisposable DestroyWith(this GameObject obj, SceneLifetime scene)

Bind GameObject lifetime to unity scene.

Parameters

obj GameObject
scene SceneLifetime

Returns

IDisposable

DestroyWith(GameObject, LifecycleBehaviour)

public static IDisposable DestroyWith(this GameObject obj, LifecycleBehaviour owner)

Bind GameObject lifetime to lifecycle owner.

Parameters

obj GameObject
owner LifecycleBehaviour

Returns

IDisposable

DestroyWith(GameObject, MonoBehaviour)

public static IDisposable DestroyWith(this GameObject obj, MonoBehaviour mono)

Bind GameObject lifetime to MonoBehaviour.

Parameters

obj GameObject
mono MonoBehaviour

Returns

IDisposable