TypeManager.TypeOverridesAttribute
[TypeOverrides] can be applied to a component that is known to contain Entity, Blob and/or UnityObject references, in order to reduce time taken during serialization operations.
Read time 4 minutesLast updated 5 days ago
Definition
- Type: Class
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)]public class TypeManager.TypeOverridesAttribute : Attribute
Remarks
Use this attribute to skip the reference patching done during serialization operations when you know the component type will never contain Entity, Blob and/or UnityObject references.
Fields
Value | Description |
|---|---|
| HasNoBlobReferences | Force the component's TypeManager.TypeInfo.BlobAssetRefOffsetCount to be zero if set to false. Otherwise, the value will only be zero if the component actually has a blob reference. |
| HasNoEntityReferences | Force the component's TypeIndex.HasEntityReferences to be false if set to true here. Otherwise, the value will only be false if the component actually has no entity references. |
| HasNoUnityObjectReferences | Configures the TypeManager to set the component type's UnityObjectRefOffsetCount to zero. |
Constructors
Constructor | Description |
|---|---|
| TypeOverridesAttribute(System.Boolean,System.Boolean,System.Boolean) | TypeManager.TypeOverridesAttribute |