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
gameObjectGameObject
Returns
GetAssetPath(GameObject)
Retrieves the asset path linked to the GameObject.
public static string GetAssetPath(this GameObject gameObject)
Parameters
gameObjectGameObject
Returns
LinkAsset(GameObject, AssetInfo)
Links an asset to the GameObject.
public static void LinkAsset(this GameObject gameObject, AssetInfo asset)
Parameters
gameObjectGameObjectassetAssetInfo
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
componentTassetAssetInfo
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
gameObjectGameObjectassetInfoAssetInfo
Returns
UnlinkAsset(GameObject)
Unlinks the asset from the GameObject.
public static void UnlinkAsset(this GameObject gameObject)
Parameters
gameObjectGameObject
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
componentT
Type Parameters
T