mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
minor code changes
This commit is contained in:
2 files changed
+1
-8
No files matched your search
@@ -11,10 +11,6 @@ public class LoadableAudioResourceAsset(string path) : LoadableAsset<AudioClip>
|
||||
{
|
||||
private readonly Assembly _assembly = Assembly.GetCallingAssembly();
|
||||
|
||||
/// <summary>
|
||||
/// Loads the asset from embedded resources.
|
||||
/// </summary>
|
||||
/// <returns>The asset to load.</returns>
|
||||
/// <inheritdoc />
|
||||
public override AudioClip LoadAsset()
|
||||
{
|
||||
|
||||
@@ -13,9 +13,6 @@ namespace MiraAPI.Utilities.Assets;
|
||||
/// <param name="bundle">The <see cref="AssetBundle"/> that contains the assets.</param>
|
||||
public class LoadableBundleSubAssetHolder(string[] names, AssetBundle bundle)
|
||||
{
|
||||
private readonly string[] spriteNames = names;
|
||||
private readonly AssetBundle bundle = bundle;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sprites contained within the asset.
|
||||
/// </summary>
|
||||
@@ -42,7 +39,7 @@ public class LoadableBundleSubAssetHolder(string[] names, AssetBundle bundle)
|
||||
|
||||
var newSprites = new List<Sprite>();
|
||||
|
||||
foreach (var name in spriteNames)
|
||||
foreach (var name in names)
|
||||
{
|
||||
var loadedAssets = bundle.LoadAssetWithSubAssets(name, Il2CppType.From(typeof(Sprite)))
|
||||
?? throw new InvalidOperationException($"INVALID ASSETS: {name}");
|
||||
|
||||
Reference in new issue
Block a user