Version: 2023.2
LanguageEnglish
  • C#

TypeTraits<T0>

class in Unity.Properties

/

Implemented in:UnityEngine.PropertiesModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Helper class to avoid paying the cost of runtime type lookups.

This is also used to abstract underlying type info in the runtime (e.g. RuntimeTypeHandle vs StaticTypeReg)

Static Properties

CanBeNull Gets a value indicating whether T can be null. i.e. The type is an object or nullable.
IsAbstract Gets a value indicating whether T is an abstract type.
IsAbstractOrInterface Gets a value indicating whether T is an abstract or interface type.
IsArray Gets a value indicating whether T is an array type.
IsContainer Gets a value indicating whether T is a property container type.
IsEnum Gets a value indicating whether T is an enum type.
IsEnumFlags Gets a value indicating whether T is an flags enum type.
IsInterface Gets a value indicating whether T is an interface type.
IsLazyLoadReference Gets a value indicating whether T is a UnityEngine.LazyLoadReference_1 type.
IsMultidimensionalArray Gets a value indicating whether T is a multidimensional array type.
IsNullable Gets a value indicating whether T is a nullable type.
IsObject Gets a value indicating whether T is Object type.
IsPrimitive Gets a value indicating whether T is a primitive type.
IsPrimitiveOrString Gets a value indicating whether T is a primitive or [[string ]] type.
IsString Gets a value indicating whether T is [[string ]] type.
IsUnityObject Gets a value indicating whether T is a UnityEngine.Object type.
IsValueType Gets a value indicating whether T is a value type.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961