Кто подскажет как сделать чтобы гуи автоматическт закрывалось через время
Код:
{
var container = new CuiElementContainer();
var Panel = container.Add(new CuiPanel
{
Image = {Color = HexToCuiColor("#007AFF74")},
RectTransform = { AnchorMin = "0.35 0.1319444", AnchorMax = "0.6453125 0.1777778"},
CursorEnabled = false,
}, "Overlay", Layer);
container.Add(new CuiElement
{
Parent = Layer,
Components =
{
new CuiImageComponent {Color = HexToCuiColor("#007AFF74"),Sprite = "Assets/Content/UI/UI.Background.Tile.psd"},
new CuiRectTransformComponent { AnchorMin = "0 0", AnchorMax = "1 1"}
}
});
container.Add(new CuiButton
{
RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1"},
Button = {Close = Layer, Color = HexToCuiColor("#007AFF74")},
Text = { Text = closes , FontSize = 15, FadeIn = 0.25f, Align = TextAnchor.MiddleCenter},
}, Layer);
CuiHelper.AddUi(player, container);
}