# BaseUxmlFactory<TCreatedType, TTraits>

> Generic base class for UXML element factories, which instantiate a VisualElement using the data read from a UXML file.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

> **Warning:**
>
> **Deprecated.** BaseUxmlFactory\<TCreatedType, TTraits> is deprecated and will be removed. Use UxmlElementAttribute instead.

```csharp
public abstract class BaseUxmlFactory<TCreatedType, TTraits> where TCreatedType : new() where TTraits : BaseUxmlTraits, new()
```

## Properties

| Property                                                                                                                                    | Description                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [canHaveAnyAttribute](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/canhaveanyattribute.md)                       | Returns UxmlTraits[BaseUxmlFactory\<TCreatedType, TTraits>.canHaveAnyAttribute](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/canhaveanyattribute.md) (where UxmlTraits is the argument for `T1`). |
| [substituteForTypeName](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/substitutefortypename.md)                   | Returns an empty string if `T0` is not [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md); otherwise, returns "VisualElement".                                                         |
| [substituteForTypeNamespace](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/substitutefortypenamespace.md)         | Returns the namespace for [BaseUxmlFactory\<TCreatedType, TTraits>.substituteForTypeName](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/substitutefortypename.md).                                 |
| [substituteForTypeQualifiedName](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/substitutefortypequalifiedname.md) | Returns the fully qualified name for [BaseUxmlFactory\<TCreatedType, TTraits>.substituteForTypeName](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/substitutefortypename.md).                      |
| [uxmlAttributesDescription](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/uxmlattributesdescription.md)           | Returns an empty enumerable.                                                                                                                                                                                                 |
| [uxmlChildElementsDescription](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/uxmlchildelementsdescription.md)     | Returns an empty enumerable.                                                                                                                                                                                                 |
| [uxmlName](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/uxmlname.md)                                             | Returns the type name of `T0`.                                                                                                                                                                                               |
| [uxmlNamespace](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/uxmlnamespace.md)                                   | Returns the namespace name of `T0`.                                                                                                                                                                                          |
| [uxmlQualifiedName](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/uxmlqualifiedname.md)                           | Returns the type fully qualified name of `T0`.                                                                                                                                                                               |
| [uxmlType](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/uxmltype.md)                                             | Returns the type of `T0`.                                                                                                                                                                                                    |

## Methods

| Method                                                                                                                | Description   |
| --------------------------------------------------------------------------------------------------------------------- | ------------- |
| [AcceptsAttributeBag](/engine/6000.0/script-reference/unityengine/uielements/baseuxmlfactory2/acceptsattributebag.md) | Returns true. |
