SubtitlesGameObjectSystemclass
Knows which subtitle lines are being spoken in this scene right now. Sounds carry their own subtitle tracks (`Sandbox.SoundFile.Subtitles`, authored in the sound editor) - `Sandbox.SubtitlesGameObjectSystem.GetActive(System.Collections.Generic.List)` samples the ones playing in this scene. The built-in overlay renders them word by word; to draw your own UI instead, turn off "Show UI" in the project's platform settings and build it on this system.
Constructors1
Showing 1 constructors
public SubtitlesGameObjectSystem(Sandbox.Scene scene)
| Parameter | Type | Description |
|---|---|---|
| scene | Scene | — |
No results match this filter.
Methods2
Showing 2 methods
public void GetActive(System.Collections.Generic.List`1<Sandbox.SubtitlesGameObjectSystem.Line> lines)
| Parameter | Type | Description |
|---|---|---|
| lines | List<Line> | — |
void—public void Show(string text, float duration = 3)
Show a subtitle that isn't attached to a sound - scripted dialogue, a radio voice you're streaming, whatever. The text is split into words spread over the duration, so it highlights word by word like a sound's subtitle track does. Main thread only.
| Parameter | Type | Description |
|---|---|---|
| text | string | — |
| duration = 3 | float | — |
void—No results match this filter.