Skip to Main Content
Table of Contents

BTD_Mod_Helper​.BloonsTD6Mod


BloonsTD6 Mod Helper

BTD_Mod_Helper

BloonsTD6Mod Class

Extend this Class instead of MelonMod to gain access to dozens of easy to use built-in hooks

public abstract class BloonsTD6Mod : BTD_Mod_Helper.BloonsMod

Inheritance MelonLoader.MelonModBloonsMod  BloonsTD6Mod

Methods

BloonsTD6Mod.ActOnMessage(Message) Method

Acts on a Network message that's been sent to the client


Use ReadMessage<T>(Message) to read back the message you sent.


If this is one of your messages and you're consuming and acting on it, return true.
Otherwise, return false. Seriously.
Note: Only invoked if CheatMod == true.

public virtual bool ActOnMessage(Message message);

Parameters

message Il2CppNinjaKiwi.NKMulti.Message

Returns

System.Boolean

BloonsTD6Mod.GetRoundHint(InGame, int, string) Method

Called before the game shows a hint for a specific round
Return 'false' to prevent the original method from running


Equivalent to a HarmonyPrefix on InGame.GetRoundHint

public virtual bool GetRoundHint(InGame inGame, int round, ref string text);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

round System.Int32

the current round

text System.String

the text the hint will have, passed as a ref to allow changes

Returns

System.Boolean

BloonsTD6Mod.OnAbilityCast(Ability) Method

Called when a ability is cast


Equivalent to a HarmonyPostFix on Ability.Activate

public virtual void OnAbilityCast(Ability ability);

Parameters

ability Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Abilities.Ability

BloonsTD6Mod.OnAttackCreated(Attack, Entity, Model) Method

Called right after an Attack is created


Equivalent to a HarmonyPostFix on Attack.Initialise

public virtual void OnAttackCreated(Attack attack, Entity entity, Model modelToUse);

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

modelToUse Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnAttackModelChanged(Attack, Model) Method

Called right after a Tower's Attack is changed for any reason (creation, upgrading, etc.)


Equivalent to a HarmonyPostFix on Attack.UpdatedModel

public virtual void OnAttackModelChanged(Attack attack, Model newModel);

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

newModel Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnAudioFactoryStart(AudioFactory) Method

Called when the games audioFactory is loaded


Equivalent to a HarmonyPostFix on AudioFactory.Start

public virtual void OnAudioFactoryStart(AudioFactory audioFactory);

Parameters

audioFactory Il2CppAssets.Scripts.Unity.Audio.AudioFactory

BloonsTD6Mod.OnBananaPickup(Cash, float) Method

Called after a banana is picked up


Equivalent to a HarmonyPostfix on Cash.Pickup

public virtual void OnBananaPickup(Cash banana, float amount);

Parameters

banana Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Behaviors.Cash

amount System.Single

BloonsTD6Mod.OnBloonCreated(Bloon) Method

Called right after a Bloon is first created


Equivalent to a HarmonyPostFix on Bloon.Initialise

public virtual void OnBloonCreated(Bloon bloon);

Parameters

bloon Il2CppAssets.Scripts.Simulation.Bloons.Bloon

BloonsTD6Mod.OnBloonEmissionsAdded(Spawner, Il2CppReferenceArray, int, int) Method

Called after a new bloon emission is added to the spawner


Equivalent to a HarmonyPostfix on Spawner.AddEmissions

public virtual void OnBloonEmissionsAdded(Spawner spawner, Il2CppReferenceArray<BloonEmissionModel> newEmissions, int round, int index=0);

Parameters

spawner Il2CppAssets.Scripts.Simulation.Track.Spawner

newEmissions Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray

round System.Int32

index System.Int32

BloonsTD6Mod.OnBloonEmitted(Spawner, BloonModel, int, int, float, Bloon) Method

Called after a bloon is emitted from a spawner


Equivalent to a HarmonyPostfix on Spawner.Emit

public virtual void OnBloonEmitted(Spawner spawner, BloonModel bloonModel, int round, int index, float startingDist, ref Bloon bloon);

Parameters

spawner Il2CppAssets.Scripts.Simulation.Track.Spawner

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

round System.Int32

index System.Int32

startingDist System.Single

bloon Il2CppAssets.Scripts.Simulation.Bloons.Bloon

BloonsTD6Mod.OnBloonModelUpdated(Bloon, Model) Method

Called right after a Bloon's BloonModel is updated


Equivalent to a HarmonyPostFix on Bloon.UpdatedModel

public virtual void OnBloonModelUpdated(Bloon bloon, Model model);

Parameters

bloon Il2CppAssets.Scripts.Simulation.Bloons.Bloon

model Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnButtonClicked(Button, PointerEventData) Method

Called after any button is clicked


Equivalent to a HarmonyPostfix on Button.OnPointerClick

public virtual void OnButtonClicked(Button button, PointerEventData clickData);

Parameters

button UnityEngine.UI.Button

clickData UnityEngine.EventSystems.PointerEventData

BloonsTD6Mod.OnConnected(NKMultiGameInterface) Method

Executed once the user has connected to a game session.
Note: Only invoked if CheatMod == true.

public virtual void OnConnected(NKMultiGameInterface nkGi);

Parameters

nkGi Il2CppNinjaKiwi.NKMulti.NKMultiGameInterface

The interface used to interact with the game.

BloonsTD6Mod.OnConnectFail(NKMultiGameInterface) Method

Executed once the user has tried to connect to a server, but failed to do so.
Note: Only invoked if CheatMod == true.

public virtual void OnConnectFail(NKMultiGameInterface nkGi);

Parameters

nkGi Il2CppNinjaKiwi.NKMulti.NKMultiGameInterface

The interface used to interact with the game.

BloonsTD6Mod.OnDefeat() Method

Called right after a match ends in defeat


Equivalent to a HarmonyPostFix on Simulation.OnDefeat

public virtual void OnDefeat();

BloonsTD6Mod.OnDisconnected(NKMultiGameInterface) Method

Executed once the player has disconnected from a server.
Note: Only invoked if CheatMod == true.

public virtual void OnDisconnected(NKMultiGameInterface nkGi);

Parameters

nkGi Il2CppNinjaKiwi.NKMulti.NKMultiGameInterface

The interface used to interact with the game.

BloonsTD6Mod.OnFastForwardChanged(bool) Method

Called right after a game ends in victory


Equivalent to a HarmonyPostFix on TimeManager.SetFastForward

public virtual void OnFastForwardChanged(bool newValue);

Parameters

newValue System.Boolean

BloonsTD6Mod.OnGameDataLoaded(GameData) Method

Called when the GameData.Instance object is first loaded

public virtual void OnGameDataLoaded(GameData gameData);

Parameters

gameData Il2CppAssets.Scripts.Data.GameData

GameData.Instance

BloonsTD6Mod.OnGameModelLoaded(GameModel) Method

Called when Game.instance.model is not null

public virtual void OnGameModelLoaded(GameModel model);

Parameters

model Il2CppAssets.Scripts.Models.GameModel

BloonsTD6Mod.OnGameObjectsReset() Method

Called when all of the existing GameObjects within a match are destroyed

public virtual void OnGameObjectsReset();

BloonsTD6Mod.OnInGameLoaded(InGame) Method

Called when InGame.instance.UnityToSimulation.Simulation is not null

public virtual void OnInGameLoaded(InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

BloonsTD6Mod.OnMainMenu() Method

Called when you go to the main menu screen


Equivalent to a HarmonyPostFix on MainMenu.OnEnable

public virtual void OnMainMenu();

BloonsTD6Mod.OnMapModelLoaded(MapModel) Method

Called when a map model is loaded by the game. Equivelant to MapLoader.Load.

public virtual void OnMapModelLoaded(ref MapModel mapModel);

Parameters

mapModel Il2CppAssets.Scripts.Models.Map.MapModel

The map that was just loaded. It is passed by reference to allow for modifications.

BloonsTD6Mod.OnMatchEnd() Method

Called when the player returns to the MainMenu from a match


Equivalent to a HarmonyPostFix on InGame.Quit

public virtual void OnMatchEnd();

BloonsTD6Mod.OnMatchStart() Method

Called right after a match is started up (restart included it seems like)


Equivalent to a HarmonyPostFix on InGame.StartMatch

public virtual void OnMatchStart();

BloonsTD6Mod.OnModelLoaded(Factory, string, Action) Method

Called when a display is being loaded such as a towers 3d model


Equivalent to a HarmonyPostFix on GameModel.CreatedModded

public virtual void OnModelLoaded(Factory factory, string ModelToLoad, System.Action<UnityDisplayNode> action);

Parameters

factory Il2CppAssets.Scripts.Unity.Display.Factory

ModelToLoad System.String

action System.Action<Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode>

BloonsTD6Mod.OnNewGameModel(GameModel, List) Method

Called when a new GameModel is created, aka when things like Monkey Knowledge are applied to towers


Equivalent to a HarmonyPostFix on GameModel.CreatedModded

public virtual void OnNewGameModel(GameModel result, List<ModModel> mods);

Parameters

result Il2CppAssets.Scripts.Models.GameModel

mods Il2CppSystem.Collections.Generic.List

BloonsTD6Mod.OnNewGameModel(GameModel, MapModel) Method

Called when a new GameModel is created, including the map


Equivalent to a HarmonyPostFix on GameModel.CreatedModded

public virtual void OnNewGameModel(GameModel result, MapModel map);

Parameters

result Il2CppAssets.Scripts.Models.GameModel

map Il2CppAssets.Scripts.Models.Map.MapModel

BloonsTD6Mod.OnNewGameModel(GameModel, IReadOnlyList) Method

Called when a new GameModel is created, aka when things like Monkey Knowledge are applied to towers


Equivalent to a HarmonyPostFix on GameModel.CreatedModded

public virtual void OnNewGameModel(GameModel result, System.Collections.Generic.IReadOnlyList<ModModel> mods);

Parameters

result Il2CppAssets.Scripts.Models.GameModel

mods System.Collections.Generic.IReadOnlyList<Il2CppAssets.Scripts.Models.ModModel>

BloonsTD6Mod.OnNewGameModel(GameModel) Method

Called when a new GameModel is created, aka when things like Monkey Knowledge are applied to towers


Equivalent to a HarmonyPostFix on GameModel.CreatedModded

public virtual void OnNewGameModel(GameModel result);

Parameters

result Il2CppAssets.Scripts.Models.GameModel

BloonsTD6Mod.OnPauseScreenClosed(PauseScreen) Method

Called when the pause screen is closed


Equivalent to a HarmonyPostfix on PauseScreen.Close

public virtual void OnPauseScreenClosed(PauseScreen pauseScreen);

Parameters

pauseScreen Il2CppAssets.Scripts.Unity.UI_New.Pause.PauseScreen

BloonsTD6Mod.OnPauseScreenOpened(PauseScreen) Method

Called when the pause screen is opened


Equivalent to a HarmonyPostfix on PauseScreen.Open

public virtual void OnPauseScreenOpened(PauseScreen pauseScreen);

Parameters

pauseScreen Il2CppAssets.Scripts.Unity.UI_New.Pause.PauseScreen

BloonsTD6Mod.OnPeerConnected(NKMultiGameInterface, int) Method

Executed when a new client has joined the game session.
Note: Only invoked if CheatMod == true.

public virtual void OnPeerConnected(NKMultiGameInterface nkGi, int peerId);

Parameters

nkGi Il2CppNinjaKiwi.NKMulti.NKMultiGameInterface

The interface used to interact with the game.

peerId System.Int32

Index of the peer in question.

BloonsTD6Mod.OnPeerDisconnected(NKMultiGameInterface, int) Method

Executed when a new client has left the game session.
Note: Only invoked if CheatMod == true.

public virtual void OnPeerDisconnected(NKMultiGameInterface nkGi, int peerId);

Parameters

nkGi Il2CppNinjaKiwi.NKMulti.NKMultiGameInterface

The interface used to interact with the game.

peerId System.Int32

Index of the peer in question.

BloonsTD6Mod.OnPointerEnterSelectable(Selectable, PointerEventData) Method

Called after the mouse goes over a selectable ui element


Equivalent to a HarmonyPostfix on Button.OnPointerEnter

public virtual void OnPointerEnterSelectable(Selectable button, PointerEventData eventData);

Parameters

button UnityEngine.UI.Selectable

eventData UnityEngine.EventSystems.PointerEventData

BloonsTD6Mod.OnPointerExitSelectable(Selectable, PointerEventData) Method

Called after the mouse leaves a button


Equivalent to a HarmonyPostfix on Button.OnPointerExit

public virtual void OnPointerExitSelectable(Selectable button, PointerEventData eventData);

Parameters

button UnityEngine.UI.Selectable

eventData UnityEngine.EventSystems.PointerEventData

BloonsTD6Mod.OnProfileLoaded(ProfileModel) Method

Called when the player's ProfileModel is loaded.


Equivalent to a HarmonyPostFix on ProfileModel.Validate

public virtual void OnProfileLoaded(ProfileModel result);

Parameters

result Il2CppAssets.Scripts.Models.Profile.ProfileModel

BloonsTD6Mod.OnProjectileCreated(Projectile, Entity, Model) Method

Called right after a Projectile is created


Equivalent to a HarmonyPostFix on Projectile.Initialise

public virtual void OnProjectileCreated(Projectile projectile, Entity entity, Model modelToUse);

Parameters

projectile Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

modelToUse Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnProjectileModelChanged(Projectile, Model) Method

Called right after a Tower's TowerModel is changed for any reason (creation, upgrading, etc.)


Equivalent to a HarmonyPostFix on Projectile.UpdatedModel

public virtual void OnProjectileModelChanged(Projectile projectile, Model newModel);

Parameters

projectile Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile

newModel Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnRemoveableDestroyed(Removeable) Method

Called after a Removeable is destroyed


Equivalent to a HarmonyPostfix on Map.DestroyRemoveable

public virtual void OnRemoveableDestroyed(Removeable removeable);

Parameters

removeable Il2CppAssets.Scripts.Simulation.Track.Removeable

BloonsTD6Mod.OnRestart() Method

Called when a match is restarted


Equivalent to a HarmonyPostFix on InGame.Restart

public virtual void OnRestart();

BloonsTD6Mod.OnRoundEnd() Method

Called right after a round starts


Equivalent to a HarmonyPostFix on Simulation.OnRoundEnd

public virtual void OnRoundEnd();

BloonsTD6Mod.OnRoundStart() Method

Called right after a round starts


Equivalent to a HarmonyPostFix on Simulation.OnRoundStart

public virtual void OnRoundStart();

BloonsTD6Mod.OnSpriteLoad(SpriteReference, Image) Method

Called when a sprite is being loaded


Equivalent to a HarmonyPostFix on ResourceLoader.LoadSpriteFromSpriteReferenceAsync

public virtual void OnSpriteLoad(SpriteReference spriteref, Image image);

Parameters

spriteref Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference

image UnityEngine.UI.Image

BloonsTD6Mod.OnTitleScreen() Method

Called right after the game finishes loading everything


Equivalent to a HarmonyPostFix on TitleScreen.Start

public virtual void OnTitleScreen();

BloonsTD6Mod.OnTowerButtonCreated(TowerModel, int, bool, ITowerPurchaseButton) Method

Called after a TowerPurchaseButton is created


Equivalent to a HarmonyPostfix on ShopMenu.CreateTowerButton

public virtual void OnTowerButtonCreated(TowerModel tower, int index, bool showAmount, ref ITowerPurchaseButton button);

Parameters

tower Il2CppAssets.Scripts.Models.Towers.TowerModel

index System.Int32

showAmount System.Boolean

button Il2CppAssets.Scripts.Unity.UI_New.InGame.StoreMenu.ITowerPurchaseButton

BloonsTD6Mod.OnTowerCreated(Tower, Entity, Model) Method

Called right after a Tower is initialized


Equivalent to a HarmonyPostFix on Tower.Initialise

public virtual void OnTowerCreated(Tower tower, Entity target, Model modelToUse);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

target Il2CppAssets.Scripts.Simulation.Objects.Entity

modelToUse Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnTowerDeselected(Tower) Method

Called right after a Tower is deselected by the player


Equivalent to a HarmonyPostFix on Tower.UnHighlight

public virtual void OnTowerDeselected(Tower tower);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

BloonsTD6Mod.OnTowerDestroyed(Tower) Method

Called right after a Tower is destroyed


Equivalent to a HarmonyPostFix on Tower.Destroyed

public virtual void OnTowerDestroyed(Tower tower);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

BloonsTD6Mod.OnTowerGraphicsCreated(TowerModel, List) Method

Called right before a Tower's 3D graphics are initialized


Equivalent to a HarmonyPreFix on InputManager.CreateTowerGraphicsAsync

public virtual void OnTowerGraphicsCreated(TowerModel towerModel, System.Collections.Generic.List<UnityDisplayNode> placementGraphics);

Parameters

towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel

placementGraphics System.Collections.Generic.List<Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode>

BloonsTD6Mod.OnTowerInventoryInit(TowerInventory, List) Method

Called after a TowerInventory is initialized


Equivalent to a HarmonyPostfix on TowerInventory.Init

public virtual void OnTowerInventoryInit(TowerInventory towerInventory, System.Collections.Generic.List<TowerDetailsModel> baseTowers);

Parameters

towerInventory Il2CppAssets.Scripts.Simulation.Input.TowerInventory

baseTowers System.Collections.Generic.List<Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel>

BloonsTD6Mod.OnTowerInventoryInitialized(TowerInventory, List) Method

Called when the TowerInventory is initialized for a game

public virtual void OnTowerInventoryInitialized(TowerInventory towerInventory, System.Collections.Generic.List<TowerDetailsModel> allTowersInTheGame);

Parameters

towerInventory Il2CppAssets.Scripts.Simulation.Input.TowerInventory

allTowersInTheGame System.Collections.Generic.List<Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel>

BloonsTD6Mod.OnTowerLoaded(Tower, TowerSaveDataModel) Method

Called when you load a save file and a Tower's save data get loaded for the tower


Use saveData.metaData to load custom information


Equivalent to a HarmonyPostFix on Tower.SetSavedData

public virtual void OnTowerLoaded(Tower tower, TowerSaveDataModel saveData);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

saveData Il2CppAssets.Scripts.Models.Profile.TowerSaveDataModel

BloonsTD6Mod.OnTowerModelChanged(Tower, Model) Method

Called right after a Tower's TowerModel is changed for any reason (creation, upgrading, etc.)


Equivalent to a HarmonyPostFix on Tower.UpdatedModel

public virtual void OnTowerModelChanged(Tower tower, Model newModel);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

newModel Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnTowerSaved(Tower, TowerSaveDataModel) Method

Called at the end of each round when a Tower's data is saved


Use saveData.metaData to save custom information


Equivalent to a HarmonyPostFix on Tower.GetSavedData

public virtual void OnTowerSaved(Tower tower, TowerSaveDataModel saveData);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

saveData Il2CppAssets.Scripts.Models.Profile.TowerSaveDataModel

BloonsTD6Mod.OnTowerSelected(Tower) Method

Called right after a Tower is selected by the player


Equivalent to a HarmonyPostFix on TowerSelectionMenu.Show

public virtual void OnTowerSelected(Tower tower);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

BloonsTD6Mod.OnTowerSold(Tower, float) Method

Called right after a Tower is sold


Equivalent to a HarmonyPostFix on Tower.OnSold

public virtual void OnTowerSold(Tower tower, float amount);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

amount System.Single

BloonsTD6Mod.OnTowerUpgraded(Tower, string, TowerModel) Method

Called right after a Tower is upgraded

public virtual void OnTowerUpgraded(Tower tower, string upgradeName, TowerModel newBaseTowerModel);

Parameters

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

upgradeName System.String

newBaseTowerModel Il2CppAssets.Scripts.Models.Towers.TowerModel

BloonsTD6Mod.OnVictory() Method

Called right after a match ends in victory


Equivalent to a HarmonyPostFix on InGame.OnVictory

public virtual void OnVictory();

BloonsTD6Mod.OnWeaponCreated(Weapon, Entity, Model) Method

Called right after a Weapon is created


Equivalent to a HarmonyPostFix on Weapon.Initialise

public virtual void OnWeaponCreated(Weapon weapon, Entity entity, Model modelToUse);

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

modelToUse Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.OnWeaponFire(Weapon) Method

Called when a weapon fires


Equivalent to a HarmonyPostFix on Weapon.SpawnDart

public virtual void OnWeaponFire(Weapon weapon);

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

BloonsTD6Mod.OnWeaponModelChanged(Weapon, Model) Method

Called right after a Tower's WeaponModel is changed for any reason (creation, upgrading, etc.)


Equivalent to a HarmonyPostFix on Weapon.UpdatedModel

public virtual void OnWeaponModelChanged(Weapon weapon, Model newModel);

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

newModel Il2CppAssets.Scripts.Models.Model

BloonsTD6Mod.PostBloonLeaked(Bloon) Method

Called right after a Bloon leaks.


Equivalent to a HarmonyPostFix on Bloon.Leaked

public virtual void PostBloonLeaked(Bloon bloon);

Parameters

bloon Il2CppAssets.Scripts.Simulation.Bloons.Bloon

BloonsTD6Mod.PostCleanProfile(ProfileModel) Method

If you removed any data in PreCleanProfile, you may want to add it back here, or just call
OnProfileLoaded(ProfileModel)
again on the profile.

public virtual void PostCleanProfile(ProfileModel profile);

Parameters

profile Il2CppAssets.Scripts.Models.Profile.ProfileModel

BloonsTD6Mod.PostSpriteLoaded(SpriteAtlas, string, Sprite) Method

Called after a sprite is loaded from a SpriteAtlas


Equivalent to a HarmonyPostfix on SpriteAtlas.GetSprite

public virtual void PostSpriteLoaded(SpriteAtlas spriteAtlas, string name, ref Sprite result);

Parameters

spriteAtlas UnityEngine.U2D.SpriteAtlas

name System.String

result UnityEngine.Sprite

BloonsTD6Mod.PreBloonLeaked(Bloon) Method

Called right before a Bloon would leak.
Return 'false' to prevent the leak from happening


Equivalent to a HarmonyPreFix on Bloon.Leaked

public virtual bool PreBloonLeaked(Bloon bloon);

Parameters

bloon Il2CppAssets.Scripts.Simulation.Bloons.Bloon

Returns

System.Boolean

BloonsTD6Mod.PreCleanProfile(ProfileModel) Method

Perform actions on a profile right before the Mod Helper cleans it. If you see that the Mod Helper cleans
past profile data from your mod on startup, it should be removed here.

public virtual void PreCleanProfile(ProfileModel profile);

Parameters

profile Il2CppAssets.Scripts.Models.Profile.ProfileModel

BloonsTD6Mod.PreSpriteLoaded(SpriteAtlas, string, Sprite) Method

Called before a sprite is loaded from a SpriteAtlas
Return 'false' to prevent the original method from running


Equivalent to a HarmonyPrefix on SpriteAtlas.GetSprite

public virtual bool PreSpriteLoaded(SpriteAtlas spriteAtlas, ref string name, ref Sprite result);

Parameters

spriteAtlas UnityEngine.U2D.SpriteAtlas

name System.String

result UnityEngine.Sprite

Returns

System.Boolean

BloonsTD6Mod.PreTowerInventoryInit(TowerInventory, IEnumerable) Method

Called before the TowerInventory is initialized


Equivalent to a HarmonyPrefix on TowerInventory.Init

public virtual void PreTowerInventoryInit(TowerInventory towerInventory, ref System.Collections.Generic.IEnumerable<TowerDetailsModel> baseTowers);

Parameters

towerInventory Il2CppAssets.Scripts.Simulation.Input.TowerInventory

baseTowers System.Collections.Generic.IEnumerable<Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel>

To learn how to download BTD Mod Helper and install mods, click here