Hi currently i'm creating a plugins to make a GUI on the Tool Cupboard Inventory but my Gui won't work it say in console "AddUI: Unknown Parent for 'CupboardOverlay': Shield" This is my code:
[ChatCommand("testUI")]
void UI_Handler(BasePlayer player) {
CuiElementContainer container = new CuiElementContainer();
var panel = container.Add(new CuiPanel {
Image = {
Color = "0.1 0.1 0.1 1"
},
RectTransform = {
AnchorMin = "0.1 0.95",
AnchorMax = "0.9 1"
},
CursorEnabled = true
}, "Shield", "CupboardOverlay");
var button = container.Add(new CuiButton {
Button = {
Command = "say clicked"
},
RectTransform = {
AnchorMin = "0.4 0",
AnchorMax = "0.7 1"
},
Text = {
Text = "Buy Shield",
FontSize = 15
}
}, panel);
CuiHelper.AddUi(player, container);
}