Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Api​.Display​.ModDisplay


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Display

ModDisplay Class

A custom Display that is a copy of an existing Display that can be modified

public abstract class ModDisplay : BTD_Mod_Helper.Api.ModContent

Inheritance System.ObjectModContent  ModDisplay

Derived
ModBloonDisplay
ModBloonOverlay
ModCustomDisplay
ModDisplay2D
ModTowerDisplay

Fields

ModDisplay.Bloon2dDisplay Field

The display id for a Red Bloon

public const string Bloon2dDisplay = "9d3c0064c3ace7448bf8fefa4a97a70f";

Field Value

System.String

ModDisplay.Generic2dDisplay Field

The display id for Road Spikes

public const string Generic2dDisplay = "9dccc16d26c1c8a45b129e2a8cbd17ba";

Field Value

System.String

Properties

ModDisplay.BaseDisplay Property

The GUID of the display to copy this ModDisplay off of

public virtual string BaseDisplay { get; }

Property Value

System.String

ModDisplay.BaseDisplayReference Property

The prefab reference itself of the base display that will be used

public virtual PrefabReference BaseDisplayReference { get; }

Property Value

Il2CppNinjaKiwi.Common.ResourceUtils.PrefabReference

ModDisplay.DisplayCategory Property

The DisplayCategory to use for the DisplayModel

public virtual DisplayCategory DisplayCategory { get; }

Property Value

Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory

ModDisplay.ModifiesUnityObject Property

If you modify the unity Object and not just the DisplayNode attached to it, then set this to true

public virtual bool ModifiesUnityObject { get; }

Property Value

System.Boolean

ModDisplay.PixelsPerUnit Property

How many pixels in a sprite texture should be equal to one unit

public virtual float PixelsPerUnit { get; }

Property Value

System.Single

ModDisplay.PositionOffset Property

The position offset to render the display at (z axis is up toward camera)

public virtual Vector3 PositionOffset { get; }

Property Value

Il2CppAssets.Scripts.Simulation.SMath.Vector3

ModDisplay.Scale Property

The scale to render the display at

public virtual float Scale { get; }

Property Value

System.Single

Methods

ModDisplay.Apply(AssetPathModel) Method

Applies this ModDisplay to a given EffectModel

public virtual void Apply(AssetPathModel assetPathModel);

Parameters

assetPathModel Il2CppAssets.Scripts.Models.Effects.AssetPathModel

ModDisplay.Apply(BloonModel) Method

Applies this ModDisplay to a given BloonModel

public virtual void Apply(BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

ModDisplay.Apply(DisplayModel) Method

Applies this ModDisplay to a given DisplayModel

public virtual void Apply(DisplayModel displayModel);

Parameters

displayModel Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayModel

ModDisplay.Apply(EffectModel) Method

Applies this ModDisplay to a given EffectModel

public virtual void Apply(EffectModel effectModel);

Parameters

effectModel Il2CppAssets.Scripts.Models.Effects.EffectModel

ModDisplay.Apply(ProjectileModel) Method

Applies this ModDisplay to a given ProjectileModel

public virtual void Apply(ProjectileModel projectileModel);

Parameters

projectileModel Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

ModDisplay.Apply(TowerModel) Method

Applies this ModDisplay to a given TowerModel

public virtual void Apply(TowerModel towerModel);

Parameters

towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel

ModDisplay.GetBloonDisplay(string) Method

Gets the Display for a given bloon

protected string GetBloonDisplay(string bloon);

Parameters

bloon System.String

The bloon base id

Returns

System.String
The display GUID

ModDisplay.GetDisplay(string, int, int, int) Method

Gets the Display for a given tower, optionally for the given tiers

protected string GetDisplay(string tower, int top=0, int mid=0, int bot=0);

Parameters

tower System.String

The tower base id

top System.Int32

Path 1 tier

mid System.Int32

Path 2 tier

bot System.Int32

Path 3 tier

Returns

System.String
The display GUID

ModDisplay.GetDisplayModel() Method

Gets a new DisplayModel based on this ModDisplay

public DisplayModel GetDisplayModel();

Returns

Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayModel

ModDisplay.ModifyDisplayNode(UnityDisplayNode) Method

Alters the UnityDisplayNode that was copied from the one used by BaseDisplay

public virtual void ModifyDisplayNode(UnityDisplayNode node);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The prototype unity display node

ModDisplay.ModifyDisplayNodeAsync(UnityDisplayNode, Action) Method

Allows you to modify this node asynchronously. On complete must be called for load to work! Takes
place after the non-async ModifyDisplayNode call

public virtual void ModifyDisplayNodeAsync(UnityDisplayNode node, System.Action onComplete);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The prototype unity display node

onComplete System.Action

Callback for when you've finished changing the node

ModDisplay.Set2DTexture(UnityDisplayNode, string) Method

Sets the sprite texture to that of a named png

protected void Set2DTexture(UnityDisplayNode node, string textureName);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The UnityDisplayNode

textureName System.String

The name of the texture, without .png

ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color, int) Method

Sets the outline color for the index'th mesh renderer in the given node

protected void SetMeshOutlineColor(UnityDisplayNode node, Color color, int index);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The UnityDisplayNode

color UnityEngine.Color

The color for it to be outlined (when not highlighted)

index System.Int32

What index of mesh renderer to use

ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color) Method

Sets the outline color for the first mesh renderer in the given node

protected void SetMeshOutlineColor(UnityDisplayNode node, Color color);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The UnityDisplayNode

color UnityEngine.Color

The color for it to be outlined (when not highlighted)

ModDisplay.SetMeshTexture(UnityDisplayNode, string, int) Method

Sets the mesh texture to that of a named png

protected void SetMeshTexture(UnityDisplayNode node, string textureName, int index);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The UnityDisplayNode

textureName System.String

The name of the texture, without .png

index System.Int32

The index to set at

ModDisplay.SetMeshTexture(UnityDisplayNode, string) Method

Sets the mesh texture to that of a named png

protected void SetMeshTexture(UnityDisplayNode node, string textureName);

Parameters

node Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode

The UnityDisplayNode

textureName System.String

The name of the texture, without .png

ModDisplay.UseNode(string, Action, DisplayCategory) Method

Gets a UnityDisplayNode for a different guid

protected void UseNode(string guid, System.Action<UnityDisplayNode> action, DisplayCategory displayCategory);

Parameters

guid System.String

The asset reference guid to get the node from

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

What to do with the node

displayCategory Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory

ModDisplay.UseNode(string, Action) Method

Gets a UnityDisplayNode for a different guid

protected void UseNode(string guid, System.Action<UnityDisplayNode> action);

Parameters

guid System.String

The asset reference guid to get the node from

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

What to do with the node

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