Class CutsceneTriggerScriptCreator
Generates a no-code "play this cutscene" trigger: a {Name}ActionSignal paired with an
[AutoRegisterEventAction] {Name}Action whose Execute resolves ICutscenePlayerService
from the ServiceLocatorBridge and plays the cutscene by id (the service is already registered in the
locator by UnitySerenityInstaller.InstallCutscenePlayer). A designer then fires the generated signal
with the existing no-code SignalEmitterComponent — no hand-written code anywhere.
Thin wrapper over Serenity.UnityGlobal.Infrastructure.Editor.SerenityEventDispatcherActionScriptCreator.CreateActionScript(System.String,System.String,System.String,System.String[],System.String[],System.Boolean) (the same
generator the Modal Builder uses), supplying a cutscene-specific Execute body.
Inherited Members
Namespace: Serenity.CutscenePlayer.Installation.Settings.Editor.Builder
Assembly: Serenity.UnityCutscenePlayer.Installation.Editor.dll
Syntax
public static class CutsceneTriggerScriptCreator
Methods
Create(string, string, string, string)
Generates the trigger script in scriptFolder.
Declaration
public static string Create(string baseName, string namespaceName, string scriptFolder, string cutsceneId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | baseName | Base name (an "Action"/"Signal" suffix is stripped; first letter upper-cased). |
| string | namespaceName | Namespace for the generated types; empty/blank generates without a namespace. |
| string | scriptFolder | Project-relative destination folder. |
| string | cutsceneId | The cutscene id passed to |
Returns
| Type | Description |
|---|---|
| string | The created file path, or null when the name was invalid. |
CreatePlayLooping(string, string, string, string)
Generates an idempotent Play/Stop trigger PAIR for a looping cutscene, driven entirely through the
cutscene service: Play{Name}Action calls ICutscenePlayerService.PlayLoopingAsync(id) and
Stop{Name}Action calls Stop(id).
Unlike Create(string, string, string, string) (one-shot PlayAsync that instantiates a fresh rig every call — see
UnityCutscenePlayerService.PlayAsyncCore), the service keeps a SINGLE looping instance per key
and re-firing Play is a no-op, so it survives being re-triggered on every state transition without
spawning duplicate rigs. No scene instance or tag required — the cutscene id is the key.
Declaration
public static string[] CreatePlayLooping(string baseName, string namespaceName, string scriptFolder, string cutsceneId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | baseName | Base name for the pair (an "Action"/"Signal" suffix is stripped; first letter upper-cased). |
| string | namespaceName | Namespace for the generated types; empty/blank generates without a namespace. |
| string | scriptFolder | Project-relative destination folder. |
| string | cutsceneId | The cutscene id passed to |
Returns
| Type | Description |
|---|---|
| string[] | The created file paths (Play then Stop), or null when the name was invalid. |