Table of Contents

Class AssetLinkerExtensions

Namespace
TAssetBundle.Extensions
Assembly
TAssetBundle.Extensions.dll

A static class that provides extension methods for AssetLinker.

public static class AssetLinkerExtensions
Inheritance
AssetLinkerExtensions
Inherited Members

Methods

GetAssetLinker(GameObject)

Retrieves the AssetLinker attached to the GameObject. If the AssetLinker is not attached, it will add one.

public static AssetLinker GetAssetLinker(this GameObject gameObject)

Parameters

gameObject GameObject

Returns

AssetLinker

GetAssetPath(GameObject)

Retrieves the asset path linked to the GameObject.

public static string GetAssetPath(this GameObject gameObject)

Parameters

gameObject GameObject

Returns

string

LinkAsset(GameObject, AssetInfo)

Links an asset to the GameObject.

public static void LinkAsset(this GameObject gameObject, AssetInfo asset)

Parameters

gameObject GameObject
asset AssetInfo

LinkAsset<T>(T, AssetInfo)

Links an asset to the GameObject associated with the component.

public static void LinkAsset<T>(this T component, AssetInfo asset) where T : Component

Parameters

component T
asset AssetInfo

Type Parameters

T

TryGetAssetInfo(GameObject, out AssetInfo)

Retrieves the asset information linked to the GameObject, if any.

public static bool TryGetAssetInfo(this GameObject gameObject, out AssetInfo assetInfo)

Parameters

gameObject GameObject
assetInfo AssetInfo

Returns

bool

UnlinkAsset(GameObject)

Unlinks the asset from the GameObject.

public static void UnlinkAsset(this GameObject gameObject)

Parameters

gameObject GameObject

UnlinkAsset<T>(T)

Unlinks the asset from the GameObject associated with the component.

public static void UnlinkAsset<T>(this T component) where T : Component

Parameters

component T

Type Parameters

T