FMOD / WWISE Scriptable Object Generator
KEditorTools
KEditorTools
There are two required scripts needed for this tool to work depending on which audio middleware you a using.
FMOD.cs (class FMODScriptableObjectGenerator)
FMODEventSO.cs
or
WWISE.cs (class WWISEScriptableObjectGenerator)
WWISEEventSO.cs
To activate these scripts in the editor, you must open each code file and remove the "//" to uncomment the #define on line 1. You can then open the Scriptable Object Generator window at Tools > Kevin > [middleware name] > Scriptable Object Generator.
If you want to add additional data or functionality to the generated scriptable objects, you have two options:
Modify the FMODEventSO or WWISEEventSO class
Use your own scriptable object class by modifying the ScriptableObjectType variable in the generator class. The class MUST inherit from FMODEventSO or WWISEEventSO
The editor window for this tool allows you to find and select events from the middleware soundbanks and auto-generate scriptable objects that hold a reference to each selected event. This is mainly helpful for triggering events using Unity's limited animation events implementation.
To choose where the scriptable objects will be generated, you can input a directory path or browse for the destination folder. The destination must be inside the Unity project's "Assets" folder. If the directory does not yet exist, it will be automatically created upon generation.
You can also mimic your middleware event folder structure when generating. There are two modes, based on the "Construct Folders Top Down?" checkbox:
If on, the folder structure will be constructed starting with the highest level folder at your chosen destination. The numeric input on the left now titled "Exclude Top Down Folder Depth" indicates what folders from the top you want to be EXCLUDE for the generation. In example, if your event has the path "Event / Music / MyEvent.event" and you set the value to 1, the Event folder will be ignored and only the Music folder will be generated with your event inside. A value of -1 will exclude all folders and generate all selected events at the destination folder.
If off, the folder structure will be constructed starting with the lowest level folder at your chosen destination. The numeric input on the left now titled "Include Bottom Up Folder Height" indicates what folders from the bottom you want to INCLUDE for the generation. In example, if your event has the path "Event / Music / MyEvent.event" and you set the value to 1, the Music folder will be generated with your event inside because it is the first level folder. A value of -1 will include all folders essentially copy your entire middleware folder structure into the destination folder.
Generated scriptable objects are automatically named after the event they are generated from.