ドキュメント

Unity Engine

Download Unity

Unity Engine

HasBuffer

Reports whether the specified Entity instance still refers to a valid entity and that it has a buffer component of type T.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

HasBuffer(Entity)

Reports whether the specified Entity instance still refers to a valid entity and that it has a buffer component of type T.
public bool HasBuffer(Entity entity)

Parameters

entity

The entity.

Returns

Type

Description

boolTrue if the entity has a buffer component of type T, and false if it does not. Also returns false if the Entity instance refers to an entity that has been destroyed.

HasBuffer(Entity, bool)

Reports whether the specified Entity instance still refers to a valid entity and that it has a buffer component of type T.
public bool HasBuffer(Entity entity, out bool entityExists)

Parameters

entity

The entity.

entityExists

Denotes whether the given entity exists. Use to distinguish entity non-existence from buffer non-existence.

Returns

Type

Description

boolTrue if the entity has a buffer component of type T, and false if it does not. Also returns false if the Entity instance refers to an entity that has been destroyed.