Table of Contents
Struct used to represent the name, position and size information of a ModHelperComponent
public readonly struct Info
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);
name
System.String
The name of the ModHelperComponent's Unity GameObject
preset
InfoPreset
A preset to apply
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float x, float y, float width, float height, Vector2 anchor, Vector2 pivot);
name
System.String
width
System.Single
height
System.Single
anchor
UnityEngine.Vector2
pivot
UnityEngine.Vector2
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float x, float y, float width, float height, Vector2 anchor);
name
System.String
width
System.Single
height
System.Single
anchor
UnityEngine.Vector2
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float x, float y, float width, float height);
name
System.String
width
System.Single
height
System.Single
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float x, float y, float size, Vector2 anchor);
name
System.String
size
System.Single
anchor
UnityEngine.Vector2
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float x, float y, float size);
name
System.String
size
System.Single
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float width, float height, Vector2 anchor);
name
System.String
width
System.Single
height
System.Single
anchor
UnityEngine.Vector2
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float width, float height);
name
System.String
width
System.Single
height
System.Single
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name, float size);
name
System.String
size
System.Single
Creates a new info struct representing the name, position and size of a ModHelperComponent
The name of the ModHelperComponent's Unity GameObjectpublic Info(string name);
name
System.String
Sets both AnchorMin and AnchorMax to the given value
public Vector2 Anchor { set; }
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; }
Sets the X coordinate of the AnchorMax to be the specified value, leaving the Y coordinate unchanged (0.5)
public float AnchorMaxX { get; set; }
Sets the Y coordinate of the AnchorMax to be the specified value, leaving the X coordinate unchanged (0.5)
public float AnchorMaxY { get; set; }
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; }
Sets the X coordinate of the AnchorMin to be the specified value, leaving the Y coordinate unchanged (0.5)
public float AnchorMinX { get; set; }
Sets the Y coordinate of the AnchorMin to be the specified value, leaving the X coordinate unchanged (0.5)
public float AnchorMinY { get; set; }
Sets both FlexWidth and FlexHeight to be a certain value
public int Flex { set; }
If this is part of a layout group, then the relative flexible height of this component.
public int FlexHeight { get; set; }
If this is part of a layout group, then the relative flexible width of this component.
public int FlexWidth { get; set; }
The sizeDelta y field. This technically is how much the width should change compared to (anchorMax.x - anchorMin.x)
public float Height { get; set; }
The name of the ModHelperComponent's Unity GameObject
public string Name { get; }
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; }
The x component of the pivot
public float PivotX { get; set; }
The y component of the pivot
public float PivotY { get; set; }
The localPosition field, by default relative to the parent's center unless anchors are changed
public Vector2 Position { get; set; }
The local scale field to initialize width
public Vector3 Scale { get; set; }
Sets both the width and the height to be a certain value
public float Size { set; }
The sizeDelta field. This technically is how much the size should change compared to (anchorMax - anchorMin)
public Vector2 SizeDelta { get; set; }
The sizeDelta x field. This technically is how much the width should change compared to (anchorMax.x - anchorMin.x)
public float Width { get; set; }
The localPosition x field, by default relative to the parent's center unless anchors are changed
public float X { get; set; }
The localPosition y field, by default relative to the parent's center unless anchors are changed
public float Y { get; set; }
Sets the properties of the RectTransform based on this Info object
public void Apply(RectTransform rectTransform);
rectTransform
UnityEngine.RectTransform
Creates a new Info with all the same properties as this
public BTD_Mod_Helper.Api.Components.Info Duplicate(string name);
name
System.String