TryGetRefRO(Entity, out RefRO<T>)
Attempts to get a safe reference to the component data, failing gracefully if the component isn't present.
阅读时间1 分钟最后更新于 19 天前
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
TryGetRefRO(Entity, RefRO<T>)
public bool TryGetRefRO(Entity entity, out RefRO<T> outRef)
Parameters
Returns
Type | Description |
|---|---|
| bool | Returns true if component |
Remarks
If is a zero-size component, will not contain a valid reference; zero-size components do not have an address in memory. However, this function will still return true or false depending on whether has component .
ToutRefentityT