---
title: "TypeSelect - s&box library"
description: "A editor tool that adds a [TypeSelector] attribute, enabling easy selection of inherited types in the inspector."
canonical: "https://sbox.watch/fr/libraries/thedimin/typeselect/"
generated_at: "2026-10-09T16:31:22.383Z"
---

# TypeSelect

A editor tool that adds a \[TypeSelector\] attribute, enabling easy selection of inherited types in the inspector.

- Type: bibliothèque
- Identifiant: thedimin.typeselect
- Créateur: thedimin
- URL canonique: https://sbox.watch/fr/libraries/thedimin/typeselect/
- Markdown: https://sbox.watch/fr/libraries/thedimin/typeselect/index.md
- sbox.game: https://sbox.game/thedimin/typeselect/
- Généré: 2026-10-09T16:31:22.383Z

## Statistiques

- dynamique sur 24 h: +0
- Terry Score: 43%
- Favoris: 0
- Votes positifs: 2
- Votes négatifs: 0
- Mis à jour: 17 mars 2025
- Créé: 17 mars 2025
- Taille: 3.6 KB
- Fichiers: 6
- Tags: attribute, attributes, development, easy, editor, extension, polymorphism, reflection

## Description

About
Type select adds \`\[TypeSelector\]\` attribute putting this on a property will allow you to select an inherited type in the editor as shown here:

WARNING
to make sure your types get serialized correctly you need to make use of the \`\[JsonPolymorphic\]\` and \`\[JsonDerivedType\]\` attributes.
And for the latter make sure to set a typeDiscirimnator or it wil not work !!!!

EXAMPLE CODE

\[GameResource( "Quest", "quest", "A quest given to the user !", Category = "quest" )\]
public class Quest : GameResource
{
 \[Property,InlineEditor,TypeSelector\] public TaskBase Task { get; set; }
}

//The two attributes here are from .net

\[JsonPolymorphic\]
\[JsonDerivedType( typeof(Collect), "Collect" )\] // Yeah you have to do this for every type. blame C\#, not me.
public abstract class TaskBase //Because this class is abstract it will not showup in the menu.
{
 \[Property\] public string QuestName {get;set};// all types will show this
}

public class Collect : TaskBase
{
 \[Property\] public int AmountToCollect {get;set;}
}

public class TalkTo : TaskBase
{
 \[Property\] public GameObject Target {get;set;}
}TODO
 ☐ Search functionality in the menu



