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
GetAssetPath(GameObject)
Retrieves the asset path linked to the GameObject.
public static string GetAssetPath(this GameObject gameObject)
Parameters
gameObject
GameObject
Returns
LinkAsset(GameObject, AssetInfo)
Links an asset to the GameObject.
public static void LinkAsset(this GameObject gameObject, AssetInfo asset)
Parameters
gameObject
GameObjectasset
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
Tasset
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
GameObjectassetInfo
AssetInfo
Returns
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