17 public CanvasGroup
cg;
19 private RectTransform
rect;
46 public void Append(Sprite s,
bool fitLine =
false)
49 Image componentInChildren = transform.GetComponentInChildren<Image>();
50 componentInChildren.sprite = s;
53 componentInChildren.Rect().sizeDelta =
new Vector2(
rect.sizeDelta.y,
rect.sizeDelta.y);
57 componentInChildren.SetNativeSize();
59 transform.transform.Rect().sizeDelta = componentInChildren.Rect().sizeDelta;
70 private void AddElement(Component c,
bool autoNewLine =
true)
81 c.transform.SetParent(
block.transform, worldPositionStays:
false);
82 block.layout.RebuildLayout();
88 for (
int num = base.transform.childCount - 1; num >= 0; num--)
90 Transform child = base.transform.GetChild(num);
91 if (!child.tag.Contains(
"IgnoreDestroy"))
static MsgBlock lastBlock
void Append(string s, Color col)
void Append(Sprite s, bool fitLine=false)
void AddElement(Component c, bool autoNewLine=true)
void AddElement(Component c, MsgBlock block)
static void DespawnOrDestroy(Component c)
static Transform Spawn(string id, string path, Transform parent)