> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).

# Class ksBuildEvents

Namespace: [KS.Reactor.Client.Unity.Editor](/reactor/api-reference/ks.reactor.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

Reactor config and runtime build event manager.\
This class can be used by developers to invoke code during different stages of building. Examples: A pre-build-server event can be registered by a developer to write scripts which convert a list of strings in the UI to a script containing enums for those strings prior to compiling the KSServerRuntime assembly.

```
A pre-build-config event can be registered by a developer to extract and write scene navigation data to 
the project directory to be loaded by a server script.
```

```csharp
public static class ksBuildEvents
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† [ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Fields

### IncludeSceneCheck <a href="#ks_reactor_client_unity_editor_ksbuildevents_includescenecheck" id="ks_reactor_client_unity_editor_ksbuildevents_includescenecheck"></a>

Invoked before any build process.

```csharp
public static ksBuildEvents.IncludeSceneCallback IncludeSceneCheck
```

#### Field Value

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[IncludeSceneCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.includescenecallback.md)

## Methods

### InvokePostBuild(bool) <a href="#ks_reactor_client_unity_editor_ksbuildevents_invokepostbuild_system_boolean" id="ks_reactor_client_unity_editor_ksbuildevents_invokepostbuild_system_boolean"></a>

Invoke registered [PostBuild](#KS_Reactor_Client_Unity_Editor_ksBuildEvents_PostBuild) events.

```csharp
public static void InvokePostBuild(bool success)
```

#### Parameters

`success` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Was the build successful?

### InvokePostBuildConfig(Scene, bool) <a href="#ks_reactor_client_unity_editor_ksbuildevents_invokepostbuildconfig_unityengine_scenemanagement_scene" id="ks_reactor_client_unity_editor_ksbuildevents_invokepostbuildconfig_unityengine_scenemanagement_scene"></a>

Invoke registered [PostBuildServer](#KS_Reactor_Client_Unity_Editor_ksBuildEvents_PostBuildServer) events.

```csharp
public static void InvokePostBuildConfig(Scene scene, bool success)
```

#### Parameters

`scene` Scene

Scene to be built. IsValid = false for common configs.

`success` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Was the config created successfully?

### InvokePostBuildServer(Configurations, bool) <a href="#ks_reactor_client_unity_editor_ksbuildevents_invokepostbuildserver_ks_reactor_client_unity_editor_ks" id="ks_reactor_client_unity_editor_ksbuildevents_invokepostbuildserver_ks_reactor_client_unity_editor_ks"></a>

Invoke registered [PostBuildServer](#KS_Reactor_Client_Unity_Editor_ksBuildEvents_PostBuildServer) events.

```csharp
public static void InvokePostBuildServer(ksServerScriptCompiler.Configurations configuration, bool success)
```

#### Parameters

`configuration` [ksServerScriptCompiler](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserverscriptcompiler.md).[Configurations](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserverscriptcompiler/ks.reactor.client.unity.editor.ksserverscriptcompiler.configurations.md)

Build configuration

`success` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Was the KSServerRuntime compiled successfully?

### InvokePreBuild() <a href="#ks_reactor_client_unity_editor_ksbuildevents_invokeprebuild" id="ks_reactor_client_unity_editor_ksbuildevents_invokeprebuild"></a>

Invoke registered [PreBuild](#KS_Reactor_Client_Unity_Editor_ksBuildEvents_PreBuild) events.

```csharp
public static void InvokePreBuild()
```

### InvokePreBuildConfig(Scene) <a href="#ks_reactor_client_unity_editor_ksbuildevents_invokeprebuildconfig_unityengine_scenemanagement_scene" id="ks_reactor_client_unity_editor_ksbuildevents_invokeprebuildconfig_unityengine_scenemanagement_scene"></a>

Invoke registered [PreBuildConfig](#KS_Reactor_Client_Unity_Editor_ksBuildEvents_PreBuildConfig) events.

```csharp
public static void InvokePreBuildConfig(Scene scene)
```

#### Parameters

`scene` Scene

Scene to be built. IsValid = false for common configs.

### InvokePreBuildServer(Configurations) <a href="#ks_reactor_client_unity_editor_ksbuildevents_invokeprebuildserver_ks_reactor_client_unity_editor_kss" id="ks_reactor_client_unity_editor_ksbuildevents_invokeprebuildserver_ks_reactor_client_unity_editor_kss"></a>

Invoke registered [PreBuildServer](#KS_Reactor_Client_Unity_Editor_ksBuildEvents_PreBuildServer) events.

```csharp
public static void InvokePreBuildServer(ksServerScriptCompiler.Configurations configuration)
```

#### Parameters

`configuration` [ksServerScriptCompiler](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserverscriptcompiler.md).[Configurations](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserverscriptcompiler/ks.reactor.client.unity.editor.ksserverscriptcompiler.configurations.md)

Build configuration

### ValidateScenePath(string) <a href="#ks_reactor_client_unity_editor_ksbuildevents_validatescenepath_system_string" id="ks_reactor_client_unity_editor_ksbuildevents_validatescenepath_system_string"></a>

Validate that a scene at a specific path exists and should be included in Reactor builds.

```csharp
public static bool ValidateScenePath(string scenePath)
```

#### Parameters

`scenePath` [string](https://learn.microsoft.com/dotnet/api/system.string)

Path to a scene file

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the scene should be included in the Reactor build.

### PostBuild <a href="#ks_reactor_client_unity_editor_ksbuildevents_postbuild" id="ks_reactor_client_unity_editor_ksbuildevents_postbuild"></a>

Invoked after any build process.

```csharp
public static event ksBuildEvents.PostBuildCallback PostBuild
```

#### Event Type

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[PostBuildCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.postbuildcallback.md)

### PostBuildConfig <a href="#ks_reactor_client_unity_editor_ksbuildevents_postbuildconfig" id="ks_reactor_client_unity_editor_ksbuildevents_postbuildconfig"></a>

Invoked after common and scene configs are written.

```csharp
public static event ksBuildEvents.PostBuildConfigCallback PostBuildConfig
```

#### Event Type

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[PostBuildConfigCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.postbuildconfigcallback.md)

### PostBuildServer <a href="#ks_reactor_client_unity_editor_ksbuildevents_postbuildserver" id="ks_reactor_client_unity_editor_ksbuildevents_postbuildserver"></a>

Invoked after the KSServerRuntime is compiled.

```csharp
public static event ksBuildEvents.PostBuildServerCallback PostBuildServer
```

#### Event Type

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[PostBuildServerCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.postbuildservercallback.md)

### PreBuild <a href="#ks_reactor_client_unity_editor_ksbuildevents_prebuild" id="ks_reactor_client_unity_editor_ksbuildevents_prebuild"></a>

Invoked before any build process.

```csharp
public static event ksBuildEvents.PreBuildCallback PreBuild
```

#### Event Type

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[PreBuildCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.prebuildcallback.md)

### PreBuildConfig <a href="#ks_reactor_client_unity_editor_ksbuildevents_prebuildconfig" id="ks_reactor_client_unity_editor_ksbuildevents_prebuildconfig"></a>

Invoked before common and scene configs are written.

```csharp
public static event ksBuildEvents.PreBuildConfigCallback PreBuildConfig
```

#### Event Type

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[PreBuildConfigCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.prebuildconfigcallback.md)

### PreBuildServer <a href="#ks_reactor_client_unity_editor_ksbuildevents_prebuildserver" id="ks_reactor_client_unity_editor_ksbuildevents_prebuildserver"></a>

Invoked before the KSServerRuntime is compiled.

```csharp
public static event ksBuildEvents.PreBuildServerCallback PreBuildServer
```

#### Event Type

[ksBuildEvents](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents.md).[PreBuildServerCallback](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildevents/ks.reactor.client.unity.editor.ksbuildevents.prebuildservercallback.md)
