Class GameEventGenerator
- Namespace
- ElectricDrill.SoapRpgFramework.Events
- Assembly
- com.electricdrill.soap-rpg-framework.Runtime.dll
A ScriptableObject tool for automatically generating GameEvent and GameEventListener classes. Allows developers to define event schemas and generate strongly-typed event classes at design time.
[CreateAssetMenu(fileName = "GameEventGenerator", menuName = "Soap RPG Framework/Events/GameEventGenerator")]
public sealed class GameEventGenerator : ScriptableObject
- Inheritance
-
objectGameEventGenerator
Fields
baseSaveLocation
Gets or sets the base directory where generated files will be saved.
public string baseSaveLocation
Field Value
- string
customNamespace
Gets or sets the custom namespace for generated event classes. If empty, uses rootNamespace.
public string customNamespace
Field Value
- string
eventsToGenerate
Gets or sets the list of event definitions to generate classes for.
public List<GameEventGenerator.GameEventDefinition> eventsToGenerate
Field Value
menuBasePath
Gets or sets the menu path prefix for CreateAssetMenu attributes on generated events.
public string menuBasePath
Field Value
- string
rootNamespace
Gets or sets the root namespace for generated event classes.
public string rootNamespace
Field Value
- string
Methods
GenerateGameEvents()
Generates C# class files for all defined game events and their corresponding listeners. Creates the necessary directory structure and writes the generated code to disk.
public void GenerateGameEvents()
RemoveGeneratedEventFiles(string, int)
Removes the generated files for a specific event from the file system.
public void RemoveGeneratedEventFiles(string eventName, int parameterCount)
Parameters
eventNamestringThe name of the event whose files should be removed
parameterCountintThe number of parameters the event had