void Ui(BasePlayer player)
{
var mainName = "blablabla";
CuiHelper.DestroyUi(player, mainName);
var Elements = new CuiElementContainer();
var HUDUI = Elements.Add(new CuiPanel
{
Image =
{
Color = "0 0 0 0"
},
RectTransform =
{
AnchorMin = "0.783 0.024",
AnchorMax = "0.835 0.135"
},
}, "Hud", mainName);
This is Main cui object
but this one under isnt adding there should be only Hi text but it didnt adding this text
Elements.Add(new CuiElement
{
Name = "CountKD111",
Parent = mainName,
Components = {
new CuiTextComponent{Text = "hi", Color = "1 0 1 1", FontSize = 20},
new CuiRectTransformComponent{AnchorMax = "0.822 0.056", AnchorMin = "0.812 0.042"}
}
});