your first panel¶
create the simplest possible UI in goo
by the end of this guide, you will have text in a container that says Hello World
the code¶
create Code/Demo/HelloWorldUI.cs:
using Goo;
using Sandbox.UI;
namespace Sandbox;
public class HelloWorldUI : GooPanel<Text>
{
protected override Text Build() => new Text("Hello");
}
add it to a scene¶
- open the s&box editor to your preferred project and scene
- create an empty GameObject in the hierarchy
- add component →
ScreenPanelorWorldPanel - add component → UI Panels →
HelloWorldUI
press play¶
if you did this correctly, you should see floating black text that says "Hello"

the text will be tiny and unstyled
make it nice¶
a small addition to the hello world example to make it look nicer:
using Goo;
using Sandbox.UI;
namespace Sandbox;
public class HelloWorldUI : GooPanel<Container>
{
protected override Container Build() => new Container
{
Padding = 24,
BackgroundColor = Color.White,
BorderRadius = 12,
Children = { new Text("Hello World") },
};
}
if you did this correctly, you should see a card container with a white background and the words "Hello World" inside of the container

congratulations. you're goo-ey now. all style properties exist in this same format