Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

EntityStorageInfoLookup

struct in Unity.Entities

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A [NativeContainer] that provides access to information about how Entities are stored. Entity.

EntityStorageInfoLookup is a native container that provides access to information about how Entities are stored. You can use EntityStorageInfoLookup to look up data associated with one entity while iterating over a different set of entities.

To get a EntityStorageInfoLookup, call ComponentSystemBase.GetEntityStorageInfoLookup.

Pass a EntityStorageInfoLookup container to a job by defining a public field of the appropriate type in your IJob implementation. You can safely read from EntityStorageInfoLookup in any job, and the EntityStorageInfoLookup will never write data.

If you would like to access an entity's storage information outside of a job, consider using the EntityManager methods EntityManager.GetStorageInfo instead, to avoid the overhead of creating a EntityStorageInfoLookup object.

[NativeContainer]: https://docs.unity3d.com/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerAttribute [NativeContainerIsReadOnly]: https://docs.unity3d.com/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerIsReadOnlyAttribute.html

Properties

Property Description
this[Entity] Gets an EntityStorageInfo for the specified entity.

Public Methods

Method Description
Exists Reports whether the specified Entity instance still refers to a valid entity.
Update When a EntityStorageInfoLookup is cached by a system across multiple system updates, calling this function inside the system's OnUpdate() method performs the minimal incremental updates necessary to make the object safe to use.