Table of Contents
A class that can be generated by your mod in order to statically load a big complex Model object in your mod, like
Ninja Kiwi does with the whole GameModel
public abstract class ModByteLoader : BTD_Mod_Helper.Api.ModContent
Inheritance System.Object ModContent ModByteLoader
Derived
↳ ModByteLoader<T>
The array of object that NinjaKiwi programmed the loader to utilize
protected object[] m;
The bytes that will be loaded from
protected byte[] Bytes { get; set; }
The file name of the bytes file within your project.
Remember to add it as an embedded resource!
protected abstract string BytesFileName { get; }
Whether the Result has been Loaded yet
public bool Loaded { get; set; }
The Task responsible for loading the bytes in the background
protected Task LoadTask { get; set; }
Il2CppSystem.Threading.Tasks.Task
Converts a generated Loader using normal System data structures to one that uses IL2Cpp ones
private static void ConvertLoader<T>(string unconvertedLoader, string convertedLoader, string className, string bytesFileName, string nameSpace=null)
where T : Object;
T
unconvertedLoader
System.String
convertedLoader
System.String
className
System.String
bytesFileName
System.String
nameSpace
System.String
Generates a ModByteLoader class and corresponding .bytes file within the BloonsTD6 directory
public static void Generate<T>(T model, string loaderFilePath, string bytesFilePath, string nameSpace=null)
where T : Object;
T
model
T
The model that you want to be able to be statically loaded from bytes
loaderFilePath
System.String
The absolute file path on your system where the .cs Loader file should end up
bytesFilePath
System.String
The absolute file path on your system where the bytes file should end up
nameSpace
System.String
If included, namespace to add to the loader cs file
Set up the bytes when this is loaded
public sealed override System.Collections.Generic.IEnumerable<BTD_Mod_Helper.Api.ModContent> Load();