isDataComponent
Whether this Component refers to a data component instead of a native component.
Read time 1 minuteLast updated 6 hours ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public bool isDataComponent { get; }
Remarks
Passing a data component to a method that does not support it, throws a . A data component represented by a Component can only be used from the main thread. On other threads it behaves as if it no longer exists: comparing it to returns , and Component.GetComponentData and Component.SetComponentData throw a , the same exception thrown when the data component has been removed. This property still returns on any thread. The data component is not affected, so back on the main thread it is no longer equal to and can be used again.
NotSupportedExceptionnulltrueMissingReferenceExceptiontruenull