logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SoundMixerEffectLoopActionScriptGenerator

    Editor-only generator that emits an Enable + Disable EventDispatcher action/signal pair for each source group of an effect loop, so the loop can be toggled from a menu without hand-writing scripts. It reuses the SAME generation as the manual "Action Script" tool (Serenity.UnityGlobal.Infrastructure.Editor.SerenityEventDispatcherActionScriptCreator.CreateActionScript(System.String,System.String,System.String,System.String[],System.String[],System.Boolean)), injecting an Execute body that resolves ISoundMixerService and calls ApplyEffectLoop / ClearEffectLoop for that (loop id, source group). Idempotent: existing files are skipped. Never throws to the caller.

    Inheritance
    object
    SoundMixerEffectLoopActionScriptGenerator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.SoundMixer.Infrastructure.AudioMixerEffectLoop.Editor
    Assembly: Serenity.UnitySoundMixer.Infrastructure.Editor.dll
    Syntax
    public static class SoundMixerEffectLoopActionScriptGenerator

    Methods

    GenerateForGroups(string, string, IEnumerable<string>, string)

    Generates the Enable/Disable pair for every group in groupNames, writing the files directly into eventsFolder.

    Declaration
    public static SoundMixerEffectLoopActionScriptGenerator.Result GenerateForGroups(string loopId, string loopName, IEnumerable<string> groupNames, string eventsFolder)
    Parameters
    Type Name Description
    string loopId

    The runtime effect-loop id (used in the generated ApplyEffectLoop/ClearEffectLoop calls).

    string loopName

    A human loop name used to build the class names (e.g. "PauseEffectLoop").

    IEnumerable<string> groupNames

    Source group names to generate a pair for.

    string eventsFolder

    Project-relative folder where the generated action scripts are saved.

    Returns
    Type Description
    SoundMixerEffectLoopActionScriptGenerator.Result
    In this article
    © 2026 Serenity. All Rights Reserved