> 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.ksbuildutils.md).

# Class ksBuildUtils

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

Build utility for iterating prefab and scene objects.

```csharp
public class ksBuildUtils
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksBuildUtils](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildutils.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)

## Methods

### AssetIsInAssetBundle(string) <a href="#ks_reactor_client_unity_editor_ksbuildutils_assetisinassetbundle_system_string" id="ks_reactor_client_unity_editor_ksbuildutils_assetisinassetbundle_system_string"></a>

Check if the asset at the given path is in an asset bundle.

```csharp
public static bool AssetIsInAssetBundle(string assetPath)
```

#### Parameters

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

Path of asset

#### Returns

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

True if the asset is in an asset bundle

### FullGameObjectName(GameObject) <a href="#ks_reactor_client_unity_editor_ksbuildutils_fullgameobjectname_unityengine_gameobject" id="ks_reactor_client_unity_editor_ksbuildutils_fullgameobjectname_unityengine_gameobject"></a>

Get a full hierarchy name for a game object

```csharp
public static string FullGameObjectName(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

Game object to get name for.

#### Returns

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

The name of the game object prefixed by the names of its parents seperated by '+'

### IteratePrefabs() <a href="#ks_reactor_client_unity_editor_ksbuildutils_iterateprefabs" id="ks_reactor_client_unity_editor_ksbuildutils_iterateprefabs"></a>

Iterates all prefabs.

```csharp
public static IEnumerable<GameObject> IteratePrefabs()
```

#### Returns

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<GameObject>

Pefab iterator

### IterateResourceAndAssetBundlePrefabs() <a href="#ks_reactor_client_unity_editor_ksbuildutils_iterateresourceandassetbundleprefabs" id="ks_reactor_client_unity_editor_ksbuildutils_iterateresourceandassetbundleprefabs"></a>

Iterates all prefabs in resources and asset bundles.

```csharp
public static IEnumerable<ksBuildUtils.PrefabInfo> IterateResourceAndAssetBundlePrefabs()
```

#### Returns

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)<[ksBuildUtils](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildutils.md).[PrefabInfo](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksbuildutils/ks.reactor.client.unity.editor.ksbuildutils.prefabinfo.md)>

Prefab iterator

### IterateSceneObjects\<T>() <a href="#ks_reactor_client_unity_editor_ksbuildutils_iteratesceneobjects__1" id="ks_reactor_client_unity_editor_ksbuildutils_iteratesceneobjects__1"></a>

Iterate all components of the type `T`in all scenes.

```csharp
public static IEnumerable<T> IterateSceneObjects<T>() where T : Component
```

#### Returns

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<T>

Iterator

#### Type Parameters

`T`

Type to iterate.

### IterateSceneObjects(params Type\[]) <a href="#ks_reactor_client_unity_editor_ksbuildutils_iteratesceneobjects_system_type" id="ks_reactor_client_unity_editor_ksbuildutils_iteratesceneobjects_system_type"></a>

Iterate all components of the given `types` in all scenes.

```csharp
public static IEnumerable<Component> IterateSceneObjects(params Type[] types)
```

#### Parameters

`types` [Type](https://learn.microsoft.com/dotnet/api/system.type)\[]

Types to iterate.

#### Returns

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<Component>

Iterator
