Luna UI provides a Credits view component that automatically scrolls through game credits with configurable sections and styling.
Create a UXML with:
"ReturnButton" for manual close<ui:UXML xmlns:ui="UnityEngine.UIElements">
<ui:ScrollView />
<ui:Button name="ReturnButton" text="Return" />
</ui:UXML>Add the CreditsView component to a GameObject with a UIDocument.

| Property | Type | Description |
|---|---|---|
| Auto Close Credits | bool | Close view when scrolling completes |
| Scroll Speed | float | Pixels per update cycle |
| Update Frequency | long | Milliseconds between scroll updates |
| Scroll Start Delay | long | Delay before scrolling starts (ms) |
| Game Title | string | Title displayed at the top |
| End Message | string | Message displayed at the bottom |
| After End Message Delay | float | Extra scroll before auto-close |
| Sections | KeyValueDatabase | Credit sections (see below) |
Credits are organized into sections using KeyValueDatabase<string, List<string>>:
Simple format:
John Smith
Jane DoePosition: Person format:
Lead Designer: John Smith
Character Artist: Jane DoeWhen a credit line contains :, it's split into a position label and person label with different styling.
The following USS classes are applied to elements:
| Class | Applied To |
|---|---|
game_title | Game title label |
section_title | Section header labels |
credit_line_container | Container for each credit line |
credited_position | Position text (before :) |
credited_person | Person name (after :) |
credit_line | Simple credit line (no :) |
end_message | End message label |
.game_title {
font-size: 48px;
-unity-font-style: bold;
-unity-text-align: middle-center;
margin-bottom: 60px;
}
.section_title {
font-size: 24px;
-unity-font-style: bold;
-unity-text-align: middle-center;
margin-top: 40px;
margin-bottom: 20px;
color: var(--color-primary);
}
.credit_line_container {
flex-direction: row;
justify-content: center;
margin-bottom: 8px;
}
.credited_position {
margin-right: 8px;
color: var(--color-slate-400);
}
.credited_person {
-unity-font-style: bold;
}
.credit_line {
-unity-text-align: middle-center;
}
.end_message {
font-size: 32px;
-unity-text-align: middle-center;
margin-top: 100px;
margin-bottom: 200px;
}Game Title: "My Awesome Game"
End Message: "Thank you for playing!"
Sections:
├─ "Development"
│ ├─ "Director: Jane Smith"
│ ├─ "Lead Programmer: John Doe"
│ └─ "UI Designer: Alex Johnson"
│
├─ "Art"
│ ├─ "Lead Artist: Sarah Wilson"
│ ├─ "Character Art: Mike Brown"
│ └─ "Environment Art: Lisa Davis"
│
├─ "Music & Sound"
│ ├─ "Composer: Chris Martin"
│ └─ "Sound Design: Emily Chen"
│
└─ "Special Thanks"
├─ "Our amazing community"
├─ "All our beta testers"
└─ "Our families and friends"The CreditsView is typically instantiated via prefab loader:
// From main menu
UIPrefabLoader.Instance.Instantiate("Credits");using UnityEngine;
using CupkekGames.Luna;
public class CustomCreditsView : CreditsView
{
protected override void OnEnable()
{
base.OnEnable();
// Custom initialization
PlayMusic();
}
protected override void OnDisable()
{
base.OnDisable();
// Custom cleanup
StopMusic();
}
private void PlayMusic()
{
// Play credits music
}
private void StopMusic()
{
// Stop credits music
}
}On Awake:
On OnEnable:
Scroll Start DelayDuring scroll:
Scroll Speed every Update Frequency msOn completion:
After End Message DelayAuto Close Credits is true, calls FadeOutThenDestroy()Return button:
FadeOutThenDestroy() to close the viewScroll Speed lower (0.5-1.0) for longer creditsScroll Start Delay to let music intro play before scrolling: in credit lines for two-column formattingend_message to ensure it's visible before auto-closeSettings
Theme
Light
Contrast
Material
Dark
Dim
Material Dark
System
Sidebar(Light & Contrast only)
Font Family
DM Sans
Wix
Inclusive Sans
AR One Sans
Direction