Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Api​.Components​.Info


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Components

Info Struct

Struct used to represent the name, position and size information of a ModHelperComponent

public readonly struct Info

Constructors

Info(string, InfoPreset) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

public Info(string name, BTD_Mod_Helper.Api.Components.InfoPreset preset);

Parameters

name System.String

The name of the ModHelperComponent's Unity GameObject

preset InfoPreset

A preset to apply

Info(string, float, float, float, float, Vector2, Vector2) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float x, float y, float width, float height, Vector2 anchor, Vector2 pivot);

Parameters

name System.String

x System.Single

y System.Single

width System.Single

height System.Single

anchor UnityEngine.Vector2

pivot UnityEngine.Vector2

Info(string, float, float, float, float, Vector2) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float x, float y, float width, float height, Vector2 anchor);

Parameters

name System.String

x System.Single

y System.Single

width System.Single

height System.Single

anchor UnityEngine.Vector2

Info(string, float, float, float, float) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float x, float y, float width, float height);

Parameters

name System.String

x System.Single

y System.Single

width System.Single

height System.Single

Info(string, float, float, float, Vector2) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float x, float y, float size, Vector2 anchor);

Parameters

name System.String

x System.Single

y System.Single

size System.Single

anchor UnityEngine.Vector2

Info(string, float, float, float) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float x, float y, float size);

Parameters

name System.String

x System.Single

y System.Single

size System.Single

Info(string, float, float, Vector2) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float width, float height, Vector2 anchor);

Parameters

name System.String

width System.Single

height System.Single

anchor UnityEngine.Vector2

Info(string, float, float) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float width, float height);

Parameters

name System.String

width System.Single

height System.Single

Info(string, float) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name, float size);

Parameters

name System.String

size System.Single

Info(string) Constructor

Creates a new info struct representing the name, position and size of a ModHelperComponent

The name of the ModHelperComponent's Unity GameObject
public Info(string name);

Parameters

name System.String

Properties

Info.Anchor Property

Sets both AnchorMin and AnchorMax to the given value

public Vector2 Anchor { set; }

Property Value

UnityEngine.Vector2

Info.AnchorMax Property

The upper anchor. (0, 0) is the parent's lower left while (1,1) is the parent's upper right. Default (0.5, 0.5)

public Vector2 AnchorMax { get; set; }

Property Value

UnityEngine.Vector2

Info.AnchorMaxX Property

Sets the X coordinate of the AnchorMax to be the specified value, leaving the Y coordinate unchanged (0.5)

public float AnchorMaxX { get; set; }

Property Value

System.Single

Info.AnchorMaxY Property

Sets the Y coordinate of the AnchorMax to be the specified value, leaving the X coordinate unchanged (0.5)

public float AnchorMaxY { get; set; }

Property Value

System.Single

Info.AnchorMin Property

The lower anchor. (0, 0) is the parent's lower left while (1,1) is the parent's upper right. Default (0.5, 0.5)

public Vector2 AnchorMin { get; set; }

Property Value

UnityEngine.Vector2

Info.AnchorMinX Property

Sets the X coordinate of the AnchorMin to be the specified value, leaving the Y coordinate unchanged (0.5)

public float AnchorMinX { get; set; }

Property Value

System.Single

Info.AnchorMinY Property

Sets the Y coordinate of the AnchorMin to be the specified value, leaving the X coordinate unchanged (0.5)

public float AnchorMinY { get; set; }

Property Value

System.Single

Info.Flex Property

Sets both FlexWidth and FlexHeight to be a certain value

public int Flex { set; }

Property Value

System.Int32

Info.FlexHeight Property

If this is part of a layout group, then the relative flexible height of this component.

public int FlexHeight { get; set; }

Property Value

System.Int32

Info.FlexWidth Property

If this is part of a layout group, then the relative flexible width of this component.

public int FlexWidth { get; set; }

Property Value

System.Int32

Info.Height Property

The sizeDelta y field. This technically is how much the width should change compared to (anchorMax.x - anchorMin.x)

public float Height { get; set; }

Property Value

System.Single

Info.Name Property

The name of the ModHelperComponent's Unity GameObject

public string Name { get; }

Property Value

System.String

Info.Pivot Property

The point between (0, 0) and (1, 1) that this object rotates around and expands out from, by default (0.5, 0.5)

public Vector2 Pivot { get; set; }

Property Value

UnityEngine.Vector2

Info.PivotX Property

The x component of the pivot

public float PivotX { get; set; }

Property Value

System.Single

Info.PivotY Property

The y component of the pivot

public float PivotY { get; set; }

Property Value

System.Single

Info.Position Property

The localPosition field, by default relative to the parent's center unless anchors are changed

public Vector2 Position { get; set; }

Property Value

UnityEngine.Vector2

Info.Scale Property

The local scale field to initialize width

public Vector3 Scale { get; set; }

Property Value

UnityEngine.Vector3

Info.Size Property

Sets both the width and the height to be a certain value

public float Size { set; }

Property Value

System.Single

Info.SizeDelta Property

The sizeDelta field. This technically is how much the size should change compared to (anchorMax - anchorMin)

public Vector2 SizeDelta { get; set; }

Property Value

UnityEngine.Vector2

Info.Width Property

The sizeDelta x field. This technically is how much the width should change compared to (anchorMax.x - anchorMin.x)

public float Width { get; set; }

Property Value

System.Single

Info.X Property

The localPosition x field, by default relative to the parent's center unless anchors are changed

public float X { get; set; }

Property Value

System.Single

Info.Y Property

The localPosition y field, by default relative to the parent's center unless anchors are changed

public float Y { get; set; }

Property Value

System.Single

Methods

Info.Apply(RectTransform) Method

Sets the properties of the RectTransform based on this Info object

public void Apply(RectTransform rectTransform);

Parameters

rectTransform UnityEngine.RectTransform

Info.Duplicate(string) Method

Creates a new Info with all the same properties as this

public BTD_Mod_Helper.Api.Components.Info Duplicate(string name);

Parameters

name System.String

Returns

Info

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