mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
23 lines
662 B
C#
23 lines
662 B
C#
using AssetRipper.SourceGenerated.Classes.ClassID_142;
|
|
|
|
namespace AssetRipper.SourceGenerated.Extensions
|
|
{
|
|
public static class AssetBundleExtensions
|
|
{
|
|
/// <summary>
|
|
/// 5.0.0 and greater
|
|
/// </summary>
|
|
public static bool HasPathExtension(UnityVersion version) => version.IsGreaterEqual(5);
|
|
|
|
/// <summary>
|
|
/// 5.0.0 and greater
|
|
/// </summary>
|
|
public static bool HasPathExtension(this IAssetBundle bundle) => HasPathExtension(bundle.Collection.Version);
|
|
|
|
public static string GetAssetBundleName(this IAssetBundle bundle)
|
|
{
|
|
return bundle.Has_AssetBundleName_C142() ? bundle.AssetBundleName_C142.String : bundle.Collection.Name;
|
|
}
|
|
}
|
|
}
|