private void Start() { GetComponent <LayoutElement>().ignoreLayout = true; AlignPosition(transform.parent.GetChild(0).GetComponent <RectTransform>(), GetComponent <RectTransform>()); CaretRenderer.SetMaterial(Graphic.defaultGraphicMaterial, Texture2D.whiteTexture); gameObject.layer = transform.parent.gameObject.layer; transform.SetAsFirstSibling(); }
private void OnEnable() { _mesh = new Mesh(); CaretRenderer.SetMaterial(Graphic.defaultGraphicMaterial, Texture2D.whiteTexture); }