tbb.blayms.mea 1.4.1

dotnet add package tbb.blayms.mea --version 1.4.1
                    
NuGet\Install-Package tbb.blayms.mea -Version 1.4.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="tbb.blayms.mea" Version="1.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="tbb.blayms.mea" Version="1.4.1" />
                    
Directory.Packages.props
<PackageReference Include="tbb.blayms.mea" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add tbb.blayms.mea --version 1.4.1
                    
#r "nuget: tbb.blayms.mea, 1.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package tbb.blayms.mea@1.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=tbb.blayms.mea&version=1.4.1
                    
Install as a Cake Addin
#tool nuget:?package=tbb.blayms.mea&version=1.4.1
                    
Install as a Cake Tool

ModExtraAssets

A tool made specifically to make the process of loading custom assets much easier. Highly recommended for use with Unity Engine BepInEx plugins.

  • Supports *.zip files (Stable.)
  • Supports *.vfp files (Recently released and highly untested but has been proven to work for the most part.)

Documentation

This tool has documentation outside GitHub. Check it here.

Supported file types

ModExtraAssets can recognize some file extensions to create a specific type of asset.

Extension Zip Condition Vfp Condition Return type
*.png None None UnityEngine.Texture2D
*.png File name must contain !number at the end to define Sprite.pixelsPerUnit value. File must contain a metadata pair (Key: meaTexType, Value: sprite!{number to define Sprite.pixelsPerUnit value}). UnityEngine.Sprite
*.png File name must contain !c at the end to differentiate it from other *.png files. File must contain a metadata pair (Key: meaTexType, Value: cubemap). UnityEngine.Cubemap
*.png File name must contain !sheet at the end to differentiate it from other *.png files and must also include a JSON file. File must contain a metadata pair (Key: meaTexType, Value: sheet). It can use a separate JSON file or another metadata pair. Please visit docs (step 5) for more information. Blayms.MEA.SpriteSheetMEA
*.wav None None UnityEngine.AudioClip
*.obj None None UnityEngine.Mesh
*.json Referencing DLLs Referencing DLLs Any deserializable type
*.txt or *.text None None System.String
*.dll *.zip configuration *.vfp configuration System.Reflection.Assembly

A couple of code snippets

Example: Loading database using a zip file with Newtonsoft.Json library

MEAZipLoadingProcedure proc = Blayms.MEA.ModExtraAssets.CreateLoadingProcedure<MEAZipLoadingProcedure>(@"D:\mycoolpluginfolder\myCoolZip.zip", this,
(string json, Type type, object[] extraData) =>
{
    return JsonConvert.DeserializeObject(json, type, (JsonSerializerSettings)extraData[0]);
}, new object[]{MyCoolClass.GetJsonSerializerSettingsFor<LocalizationData>()});
proc.Initiate();

Example: Perform actions after all assets have finished loading from a *.zip file

// CREATE THE PROCEDURE
MEAZipLoadingProcedure meaZipLoadingProcedure = ModExtraAssets.CreateLoadingProcedure<MEAZipLoadingProcedure>
(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"zip.zip"), BasePlugin.Instance, (string json, Type type, object[] extraData)
=> JsonConvert.DeserializeObject(json, type, Class.MyJsonSerializerSettings(type)), null);

meaZipLoadingProcedure.onLoadingResultDefined +=
delegate (MEAZipLoadingProcedure.LoadingResult loadingResult) // Subscribe to the event
{
   if(loadingResult == MEAZipLoadingProcedure.LoadingResult.Success)
   {
        // CODE
   }
};
meaZipLoadingProcedure.Initiate(); // START LOADING ASSETS

Credits

This tool was made by Blayms and uses some utilities found online, such as:

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.1 349 6/10/2025
1.4.0 157 3/16/2025
1.3.0 170 8/8/2024
1.2.4 157 5/12/2024
1.2.3 184 3/28/2024
1.2.1 146 3/26/2024
1.2.0 178 3/25/2024
1.1.1 139 3/20/2024
1.0.5 176 3/20/2024

1.3:
- ModExtraAssets is capable of loading sprite sheets (more on that on docs page)
- Changed pixelsPerUnit from int to float everywhere

1.4:
- Changed API slightly (Removed LoadAllZipAssets function, insured a support for different file types by adding MEALoadingProcedureBase class)
- Added procedure support for Versatile File Packages (My own archive-like file format that uses LZMA compression). The VFP Editor is not yet public and I don't think it will be public any time soon, but I'm definetely planning to do that! Read some information about that file type here on docs:  https://sites.google.com/view/mea-docs/main/useful-information/vfp-info

1.4.1:
- Fixed a major bug with sprite sheets
- Planning to add MTM101BMDE support, only planning atm!