-
Notifications
You must be signed in to change notification settings - Fork 39
DisplayKit
davidsebesta edited this page Jun 6, 2026
·
7 revisions
DisplayKit is a network-synchronised UI framework for SCP: SL that allows server-side creation and management of UI elements displayed to clients.
This guide has been made in order to help developers with a quick start.
Our goal is to provide a quick overview of features with a focus on examples.
If you wish to learn more about the UI styling, check out Unity's UI Toolkit, on which this framework is built on.
- Server-Authoritative - All UI elements are created on the server and automatically synchronised to observers
- Per-Player or Global Canvases - Create individual UI per player or shared global UI
- Automatic Network Sync - Changes to UI elements automatically sync to all observers
- Efficient Dirty Tracking - Only modified properties are sent over the network
- Full Flexbox Support - CSS-like flexbox layout system
- Complete Styling - Backgrounds, borders, text, positioning, transforms, and more
Add a reference to UnityEngine.UIElementsModule and UnityEngine.TextRenderingModule to use certain properties.
using DisplayKit.Elements;
using UnityEngine;
using UnityEngine.UIElements;
// Create a global canvas (all players see it)
DisplayCanvas canvas = DisplayCanvas.Create();
canvas.DefaultVisibility = CanvasVisibility.Visible;
canvas.Background.Color = new Color(0, 0, 0, 0.8f);
// Add text
DisplayText welcomeText = canvas.AddText("Welcome to the Server!");
welcomeText.Text.Font = FontType.RobotoBold;
welcomeText.Text.FontSize = 48f;
welcomeText.Text.Color = Color.white;
welcomeText.Text.Align = TextAnchor.MiddleCenter;
// Center the text
canvas.Align.AlignItems = Align.Center;
canvas.Align.JustifyContent = Justify.Center;
// Send to all players
canvas.Spawn();
- Create a Canvas - The root container for all UI elements
- Add Elements - Add text or container elements to the canvas
- Configure Styles - Set visual properties (colors, sizes, fonts, etc.)
- Spawn to Players - Send the canvas to clients
- Update as Needed - Modify properties and changes sync automatically
- Creating Elements - How to create canvases and elements
- Modifying Elements - Updating element properties
- Deleting Elements - Removing elements and canvases
- Sending to Players - Per-player vs global canvases
- Element Reference - API documentation for elements
- Style Properties - Complete styling reference
- Examples - Practical code examples
- Making Plugins
- Features
- Guides