не могу понять понять в чём проблема
[PluginReference]
private Plugin ImageLibrary;
void OnServerInitialized()
{
ImageLibrary.Call("AddImage", "ссылка", "lolawdawd");
Puts("lol");
}
void StatsUI(BasePlayer player)
{
CuiHelper.DestroyUi(player, "MainStats");
var container = new CuiElementContainer();
container.Add(new CuiPanel
{
CursorEnabled = true,
RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1", OffsetMax = "0 0" },
Image = { Color = "0 0 0 0" }
}, "Overlay", "MainStats");
container.Add(new CuiElement
{
Parent = "MainStats",
Components =
{
new CuiRawImageComponent { Png = (string)ImageLibrary.Call("GetImage", "lolawdawd") },
new CuiRectTransformComponent { AnchorMin = "0 0", AnchorMax = "1 1" }
}
});
CuiHelper.AddUi(player, container);
}
на выходе получаю:
[PluginReference]
private Plugin ImageLibrary;
void OnServerInitialized()
{
ImageLibrary.Call("AddImage", "ссылка", "lolawdawd");
Puts("lol");
}
void StatsUI(BasePlayer player)
{
CuiHelper.DestroyUi(player, "MainStats");
var container = new CuiElementContainer();
container.Add(new CuiPanel
{
CursorEnabled = true,
RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1", OffsetMax = "0 0" },
Image = { Color = "0 0 0 0" }
}, "Overlay", "MainStats");
container.Add(new CuiElement
{
Parent = "MainStats",
Components =
{
new CuiRawImageComponent { Png = (string)ImageLibrary.Call("GetImage", "lolawdawd") },
new CuiRectTransformComponent { AnchorMin = "0 0", AnchorMax = "1 1" }
}
});
CuiHelper.AddUi(player, container);
}
на выходе получаю: