# PresetType

> Stores a type to which a Preset can be applied.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEditor.Presets](/engine/6000.3/script-reference/unityeditor/presets.md)
* **Assembly:** UnityEditor
* **Implements:** [IEquatable\<PresetType>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct PresetType : IEquatable<PresetType>
```

## Remarks

Only classes that inherit from UnityEngine.Object are represented by a PresetType.

This structure is used instead of Type because some native C++ types in Unity are not exposed to managed C# for optimization reasons.

## Methods

| Method                                                                                                     | Description                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetManagedTypeName](/engine/6000.3/script-reference/unityeditor/presets/presettype/getmanagedtypename.md) | Retrieves a human readable namespace and the name of the target class, regardless of whether it's a managed C# class or a native C++ class.                                                                           |
| [IsValid](/engine/6000.3/script-reference/unityeditor/presets/presettype/isvalid.md)                       | Checks whether a [PresetType](/engine/6000.3/script-reference/unityeditor/presets/presettype.md) corresponds with a valid native or managed class.                                                                    |
| [IsValidDefault](/engine/6000.3/script-reference/unityeditor/presets/presettype/isvaliddefault.md)         | Checks whether a [PresetType](/engine/6000.3/script-reference/unityeditor/presets/presettype.md) can be used within the [DefaultPreset](/engine/6000.3/script-reference/unityeditor/presets/defaultpreset.md) system. |
