ドキュメント

Unity Engine

Download Unity

Unity Engine

IsValid

Property that returns true if the reference is valid, false otherwise.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public bool IsValid { get; }

Remarks

This property does not take into account if the component is enabled or not.
This property is intended to indicate whether it is safe to read or write this reference's value. It is not safe to use this value as a synonym for "does the target entity have component T?". For zero-size "tag" components (which have no addressable value in chunk memory), IsValid will always return false, even if the component is present. It is safer to use existing HasComponent features to test for component presence.