Jeremy Pritts 3509ddd1c3 2023 support
* Resolves #917
* Resolves #1023
2023-10-14 12:27:15 -04:00

23 lines
656 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_R() ? bundle.AssetBundleName_R : bundle.Collection.Bundle.Name;
}
}
}