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

# Class ksSceneTracker

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

Track scene and asset modification times.

```csharp
public class ksSceneTracker : ScriptableObject
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← Object ← ScriptableObject ← [ksSceneTracker](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksscenetracker.md)

#### Inherited Members

ScriptableObject.SetDirty(), ScriptableObject.CreateInstance(string), ScriptableObject.CreateInstance(Type), ScriptableObject.CreateInstance\<T>(), Object.GetInstanceID(), Object.GetHashCode(), Object.Equals(object), Object.Instantiate(Object, Vector3, Quaternion), Object.Instantiate(Object, Vector3, Quaternion, Transform), Object.Instantiate(Object), Object.Instantiate(Object, Transform), Object.Instantiate(Object, Transform, bool), Object.Instantiate\<T>(T), Object.Instantiate\<T>(T, Vector3, Quaternion), Object.Instantiate\<T>(T, Vector3, Quaternion, Transform), Object.Instantiate\<T>(T, Transform), Object.Instantiate\<T>(T, Transform, bool), Object.Destroy(Object, float), Object.Destroy(Object), Object.DestroyImmediate(Object, bool), Object.DestroyImmediate(Object), Object.FindObjectsOfType(Type), Object.FindObjectsOfType(Type, bool), Object.FindObjectsByType(Type, FindObjectsSortMode), Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode), Object.DontDestroyOnLoad(Object), Object.DestroyObject(Object, float), Object.DestroyObject(Object), Object.FindSceneObjectsOfType(Type), Object.FindObjectsOfTypeIncludingAssets(Type), Object.FindObjectsOfType\<T>(), Object.FindObjectsByType\<T>(FindObjectsSortMode), Object.FindObjectsOfType\<T>(bool), Object.FindObjectsByType\<T>(FindObjectsInactive, FindObjectsSortMode), Object.FindObjectOfType\<T>(), Object.FindObjectOfType\<T>(bool), Object.FindFirstObjectByType\<T>(), Object.FindAnyObjectByType\<T>(), Object.FindFirstObjectByType\<T>(FindObjectsInactive), Object.FindAnyObjectByType\<T>(FindObjectsInactive), Object.FindObjectsOfTypeAll(Type), Object.FindObjectOfType(Type), Object.FindFirstObjectByType(Type), Object.FindAnyObjectByType(Type), Object.FindObjectOfType(Type, bool), Object.FindFirstObjectByType(Type, FindObjectsInactive), Object.FindAnyObjectByType(Type, FindObjectsInactive), Object.ToString(), Object.name, Object.hideFlags, [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

### Clear() <a href="#ks_reactor_client_unity_editor_ksscenetracker_clear" id="ks_reactor_client_unity_editor_ksscenetracker_clear"></a>

Clear all tracking data.

```csharp
public void Clear()
```

### GetModifiedScenes() <a href="#ks_reactor_client_unity_editor_ksscenetracker_getmodifiedscenes" id="ks_reactor_client_unity_editor_ksscenetracker_getmodifiedscenes"></a>

Return a list of paths for scenes that have been modified since they were added to this tracker.

```csharp
public List<string> GetModifiedScenes()
```

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)>

List of paths for scenes that were modified.

### GetScenesReferencingModifiedAssets() <a href="#ks_reactor_client_unity_editor_ksscenetracker_getscenesreferencingmodifiedassets" id="ks_reactor_client_unity_editor_ksscenetracker_getscenesreferencingmodifiedassets"></a>

Get a list of scenes which reference modified assets files.

```csharp
public List<string> GetScenesReferencingModifiedAssets()
```

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)>

List of scene referenced by modified assets.

### OnEnable() <a href="#ks_reactor_client_unity_editor_ksscenetracker_onenable" id="ks_reactor_client_unity_editor_ksscenetracker_onenable"></a>

Update the config writer when loaded after Unity serialization (or when the object is created).

```csharp
public void OnEnable()
```

### RemoveAssetSceneReferences(string) <a href="#ks_reactor_client_unity_editor_ksscenetracker_removeassetscenereferences_system_string" id="ks_reactor_client_unity_editor_ksscenetracker_removeassetscenereferences_system_string"></a>

Remove scene references from all tracked assets

```csharp
public void RemoveAssetSceneReferences(string scenePath)
```

#### Parameters

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

### TrackAsset(string, string) <a href="#ks_reactor_client_unity_editor_ksscenetracker_trackasset_system_string_system_string" id="ks_reactor_client_unity_editor_ksscenetracker_trackasset_system_string_system_string"></a>

Track when an asset was last modified and associate it with a scene.

```csharp
public void TrackAsset(string path, string scenePath)
```

#### Parameters

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

Path to an asset file.

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

Path to a scene asset file.

### TrackScene(string, bool) <a href="#ks_reactor_client_unity_editor_ksscenetracker_trackscene_system_string_system_boolean" id="ks_reactor_client_unity_editor_ksscenetracker_trackscene_system_string_system_boolean"></a>

Track a scene modification time.

```csharp
public void TrackScene(string path, bool expectConfig)
```

#### Parameters

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

Scene path

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

Do we expect the scene to have a config file?
