> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/scene-fusion/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/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sftypecache.md).

# Class sfTypeCache

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

Maps UnityEngine.Object types strings to types and component type names (without name spaces) to lists of non-abstract types that may be assignable for that type name, with one entry in the list for each component type with the same name but a different namespace. We need this because Unity doesn't include the namespace when it gives us a reference property's type string.

```csharp
public class sfTypeCache
```

#### Inheritance

object ← [sfTypeCache](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sftypecache.md)

## Properties

### ScriptTypes <a href="#ks_scenefusion_client_unity_editor_sftypecache_scripttypes" id="ks_scenefusion_client_unity_editor_sftypecache_scripttypes"></a>

All Monobehaviour and serializable types in Unity script assemblies.

```csharp
public HashSet<Type> ScriptTypes { get; }
```

#### Property Value

HashSet\<Type>

## Methods

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

```csharp
public static sfTypeCache Get()
```

#### Returns

[sfTypeCache](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sftypecache.md)

singleton instance

### GetComponentTypes(string) <a href="#ks_scenefusion_client_unity_editor_sftypecache_getcomponenttypes_system_string" id="ks_scenefusion_client_unity_editor_sftypecache_getcomponenttypes_system_string"></a>

Gets an array of types that may be assignable to a reference property with the given type name.

```csharp
public Type[] GetComponentTypes(string name)
```

#### Parameters

`name` string

name of type.

#### Returns

Type\[]

types that may be assignable for that type name.

### GetEnumerator() <a href="#ks_scenefusion_client_unity_editor_sftypecache_getenumerator" id="ks_scenefusion_client_unity_editor_sftypecache_getenumerator"></a>

```csharp
public IEnumerator<Type> GetEnumerator()
```

#### Returns

IEnumerator\<Type>

enumerator for the cache.

### Load(string) <a href="#ks_scenefusion_client_unity_editor_sftypecache_load_system_string" id="ks_scenefusion_client_unity_editor_sftypecache_load_system_string"></a>

Gets a UnityEngine.Object type by name (including namespace).

```csharp
public Type Load(string name)
```

#### Parameters

`name` string

name of type to get including namespace.

#### Returns

Type

type with the given name, or null if not found.
