Table of Contents
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.Object ModContent ModDisplay
Derived
↳ ModBloonDisplay
↳ ModBloonOverlay
↳ ModCustomDisplay
↳ ModDisplay2D
↳ ModTowerDisplay
The display id for a Red Bloon
public const string Bloon2dDisplay = "9d3c0064c3ace7448bf8fefa4a97a70f";
The display id for Road Spikes
public const string Generic2dDisplay = "9dccc16d26c1c8a45b129e2a8cbd17ba";
The GUID of the display to copy this ModDisplay off of
public virtual string BaseDisplay { get; }
The prefab reference itself of the base display that will be used
public virtual PrefabReference BaseDisplayReference { get; }
Il2CppNinjaKiwi.Common.ResourceUtils.PrefabReference
The DisplayCategory to use for the DisplayModel
public virtual DisplayCategory DisplayCategory { get; }
Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory
If you modify the unity Object and not just the DisplayNode attached to it, then set this to true
public virtual bool ModifiesUnityObject { get; }
How many pixels in a sprite texture should be equal to one unit
public virtual float PixelsPerUnit { get; }
The position offset to render the display at (z axis is up toward camera)
public virtual Vector3 PositionOffset { get; }
Il2CppAssets.Scripts.Simulation.SMath.Vector3
The scale to render the display at
public virtual float Scale { get; }
Applies this ModDisplay to a given EffectModel
public virtual void Apply(AssetPathModel assetPathModel);
assetPathModel
Il2CppAssets.Scripts.Models.Effects.AssetPathModel
Applies this ModDisplay to a given BloonModel
public virtual void Apply(BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Applies this ModDisplay to a given DisplayModel
public virtual void Apply(DisplayModel displayModel);
displayModel
Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayModel
Applies this ModDisplay to a given EffectModel
public virtual void Apply(EffectModel effectModel);
effectModel
Il2CppAssets.Scripts.Models.Effects.EffectModel
Applies this ModDisplay to a given ProjectileModel
public virtual void Apply(ProjectileModel projectileModel);
projectileModel
Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel
Applies this ModDisplay to a given TowerModel
public virtual void Apply(TowerModel towerModel);
towerModel
Il2CppAssets.Scripts.Models.Towers.TowerModel
Gets the Display for a given bloon
protected string GetBloonDisplay(string bloon);
bloon
System.String
The bloon base id
System.String
The display GUID
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);
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
System.String
The display GUID
Gets a new DisplayModel based on this ModDisplay
public DisplayModel GetDisplayModel();
Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayModel
Alters the UnityDisplayNode that was copied from the one used by BaseDisplay
public virtual void ModifyDisplayNode(UnityDisplayNode node);
node
Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode
The prototype unity display node
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);
node
Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode
The prototype unity display node
onComplete
System.Action
Callback for when you've finished changing the node
Sets the sprite texture to that of a named png
protected void Set2DTexture(UnityDisplayNode node, string textureName);
node
Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode
The UnityDisplayNode
textureName
System.String
The name of the texture, without .png
Sets the outline color for the index'th mesh renderer in the given node
protected void SetMeshOutlineColor(UnityDisplayNode node, Color color, int index);
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
Sets the outline color for the first mesh renderer in the given node
protected void SetMeshOutlineColor(UnityDisplayNode node, Color color);
node
Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode
The UnityDisplayNode
color
UnityEngine.Color
The color for it to be outlined (when not highlighted)
Sets the mesh texture to that of a named png
protected void SetMeshTexture(UnityDisplayNode node, string textureName, int index);
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
Sets the mesh texture to that of a named png
protected void SetMeshTexture(UnityDisplayNode node, string textureName);
node
Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode
The UnityDisplayNode
textureName
System.String
The name of the texture, without .png
Gets a UnityDisplayNode for a different guid
protected void UseNode(string guid, System.Action<UnityDisplayNode> action, DisplayCategory displayCategory);
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
Gets a UnityDisplayNode for a different guid
protected void UseNode(string guid, System.Action<UnityDisplayNode> action);
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