SerializeReference Selector
Pick the field's class in the Inspector, and keep its data when the class changes.
Quick start
| Before — Unity API | After — FastTools |
|---|---|
| |
Which classes are offered
An IWeapon field offers concrete implementations of that interface, such as Pistol and Shotgun. Selecting one creates an instance; <None> clears the field.
For extra constraints, required fields and list appearance, see TypeSelector.
Allowhas no effect here: the types must be instantiable.- Classes derived from
UnityEngine.Objectare not offered: keep such an object in a plain field, without[SerializeReference]. - Generic arguments are inferred from the field type and the
[TypeSelector]types; when they cannot be, the picker asks for types Unity can serialize.
Lists
In a list with [TypeSelector], “+” opens the class picker and adds a new instance, and <None> adds an empty element. With several objects selected, each gets its own instance.


Switching the class
When switching classes, FastTools tries to carry compatible values of fields with the same names. Fields that cannot be transferred keep the new instance's values:
| Field | Pistol | → Shotgun |
|---|---|---|
| Damage | 37 | 37 |
| Magazine Size | 12 | — |
| Pellets | — | 8, the initial value |


A nested reference carries over as the same instance when the field name and type are compatible.
You can also pick the class by dragging a .cs file from Project onto the field header.
Header menu
Right-click the field header:
| Item | What it does |
|---|---|
| Revert | On a prefab instance, returns a field with a changed class or data to the prefab's class and data; the label of such a field is bold. A change inside a nested reference marks only the changed field |
| Apply to Prefab 'Player' | On a prefab instance, writes such a field into the prefab; not offered for a prefab variant selected in Project |
| Copy Serialize Reference | Copies the field's class and data; the copy lasts until the next domain reload |
| Paste Serialize Reference | Pastes the copy into a field of a compatible type; a copied empty field clears it |
| Find Usages of Pistol | Searches the project for the class through Unity Search |
| Create New Script… | Creates a [Serializable] class for the field type and assigns it after compilation |
| Save as Template… | Saves the value under a name; templates live in the editor settings on this machine, not in the project |
| Paste Template → … | Creates an instance from a template; only templates that fit the field are listed |
| Paste Template → Remove Missing (N)… | Deletes templates whose class no longer loads; shown only when such templates exist |
Copy/Paste and templates do not carry nested [SerializeReference] fields: the pasted object loses those references.
Shared references
Link to Existing → … in the header menu links the field to an instance from another field on the same object.
Fields that point at one instance are marked Shared reference #N; Make unique under the field or Make Unique Reference in the header menu gives the field its own copy, nested references included.


A duplicated list element gets its own instance instead of a reference to the same one. The Auto de-alias duplicated list elements setting under Tools → Aspid 🐍 → FastTools → Settings controls this and is on by default; it is shared by the team.
This works for lists whose elements are references, such as List<IWeapon>. In a list of structs or classes that hold a [SerializeReference] field or list, Duplicate Array Element copies the reference too, so both elements share one instance until Make unique separates them.
Missing type
After a class is renamed, moved or deleted, the field shows <Missing …> with a Missing type notice under it. The field's data stays in the asset.


Fix opens the class picker, and the class you pick replaces the missing one. The notice may also offer a matching class, for example → Pistol; the tooltip gives the reason. What Fix keeps on an asset and in a scene is described in Fix in the Inspector.
Project References finds every missing reference in the project and repairs them in groups. The build check and breakage detection report new ones.
Custom inspector
In your own editor, a regular PropertyField draws a [TypeSelector] field, in UI Toolkit and in IMGUI: the class picker and the list's “+” come by themselves. For list elements drawn separately, use SerializeReferenceEditorGUI or SerializeReferenceIMGUIList.
Package sample
For weapon selection, lists and nested references, see the SerializeReferences sample.

