Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UxmlFactory<TCreatedType, TTraits>

Generic base class for UXML factories, which instantiate a VisualElement using the data read from a UXML file.
Read time 1 minuteLast updated 11 days ago

Definition

Warning
Deprecated. UxmlFactory<TCreatedType, TTraits> is deprecated and will be removed. Use UxmlElementAttribute instead.
public class UxmlFactory<TCreatedType, TTraits> : BaseUxmlFactory<TCreatedType, TTraits>, IUxmlFactory, IBaseUxmlFactory where TCreatedType : VisualElement, new() where TTraits : UxmlTraits, new()

Remarks

T0 The type of the element that will be instantiated. It must derive from VisualElement.
T1 The traits of the element that will be instantiated. It must derive from UxmlTraits.

Methods

Method

Description

CreateInstantiate an object of type
T0
and initialize it by calling
T1
UxmlTraitsInit method.

Inheritance