menu_bookDocumentation

Your First Project - s&box Documentation

calendar_today May 5, 2026 schedule ~1 min read person PatrickJr verified 50

Your First Project

Creating Game Objects

In s&box, everything in your scene is a GameObject. GameObjects can have Components attached to them that provide functionality.

To create a GameObject:

  1. Right-click in the Hierarchy panel
  2. Select Create Empty or choose a template
  3. The GameObject appears in your scene

Creating Components

Components add functionality to GameObjects. To create a Component:

  1. Select a GameObject in the Hierarchy
  2. Click Add Component in the Inspector
  3. Choose a Component type or create a new one

Player Input

Here's a simple example of handling player input in a Component:

CSHARP
public class MyPlayer : Component
{
    protected override void OnUpdate()
    {
        // Check for jump input
        if ( Input.Pressed( "Jump" ) )
        {
            Log.Info( "Jump pressed!" );
        }
        
        // Get movement input
        var moveInput = Input.AnalogMove;
        
        // Apply movement
        WorldPosition += moveInput * Time.Delta * 100f;
    }
}

Next Steps

Was this helpful?