> For the complete documentation index, see [llms.txt](https://heroicsolo.gitbook.io/heroic-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heroicsolo.gitbook.io/heroic-engine/basics/engine-utilities/typeutility.md).

# TypeUtility

This class provides functionality for getting Type by given type name presented by string.

### Available methods

```csharp
public static Type GetTypeByName(string name)
```

*This method returns Type by given string **name.** If type wasn't found in assembly, it returns **null**.*

*Example:*

```csharp
private void InstantiateSystem()
{
    var scriptType = TypeUtility.GetTypeByName(className);

    if (scriptType != null)
    {
        // Create a new GameObject and add the script as a component
        GameObject newObject = new GameObject(className);
        newObject.AddComponent(scriptType);
        AssetDatabase.Refresh();
    }
}
```
