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

# Class ksAssetIdData

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

An editor asset that stores a persistent mapping of assets to ids. Some assets use Unity classes as proxies instead of deriving from [ksProxyScriptAsset](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksproxyscriptasset.md). Since these assets cannot store there own asset id like our proxy assets, they must save their asset ids in this map.

```csharp
public class ksAssetIdData : ScriptableObject
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† Object â† ScriptableObject â† [ksAssetIdData](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksassetiddata.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

### Get() <a href="#ks_reactor_client_unity_editor_ksassetiddata_get" id="ks_reactor_client_unity_editor_ksassetiddata_get"></a>

Gets the [ksAssetIdData](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksassetiddata.md) singleton asset. Loads it if it's not already loaded.

```csharp
public static ksAssetIdData Get()
```

#### Returns

[ksAssetIdData](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksassetiddata.md)

Singleton asset.

### GetId(Object) <a href="#ks_reactor_client_unity_editor_ksassetiddata_getid_unityengine_object" id="ks_reactor_client_unity_editor_ksassetiddata_getid_unityengine_object"></a>

Gets the id of an asset from the map.

```csharp
public uint GetId(Object asset)
```

#### Parameters

`asset` Object

Asset to get id for.

#### Returns

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

Id of the asset, or 0 if the asset has no id.

### RemoveMissingAssets() <a href="#ks_reactor_client_unity_editor_ksassetiddata_removemissingassets" id="ks_reactor_client_unity_editor_ksassetiddata_removemissingassets"></a>

Removes missing assets from the map.

```csharp
public void RemoveMissingAssets()
```

### SetId(Object, uint) <a href="#ks_reactor_client_unity_editor_ksassetiddata_setid_unityengine_object_system_uint32" id="ks_reactor_client_unity_editor_ksassetiddata_setid_unityengine_object_system_uint32"></a>

Sets the id of an asset in the map.

```csharp
public void SetId(Object asset, uint id)
```

#### Parameters

`asset` Object

Asset to set id for.

`id` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Id of the asset.
