JetBrains Rider 2025.3 Help

Code inspection: Field of 'ComponentLookup' type must be updated before being used.

In Unity DOTS (Data-Oriented Technology Stack), ComponentLookup<T> (formerly ComponentDataFromEntity<T>) objects must be properly synchronized before they are used to access component data. This inspection ensures that ComponentLookup fields within a system are updated every frame.

Why is this problematic?

ComponentLookup provides access to component data across different entities. To ensure it has the latest version of the data and handles dependency tracking correctly, it must be updated every frame using the current SystemState. Failing to call .Update(ref state) can lead to working with outdated data or runtime errors.

How to fix

Call .Update(ref state) on the ComponentLookup field within your system's OnUpdate method (or other appropriate methods excluding OnCreate and OnDestroy). JetBrains Rider provides a quick-fix to automatically insert the necessary update call.

public void OnUpdate(ref SystemState state) { // ... code using myLookup ... }
public void OnUpdate(ref SystemState state) { myLookup.Update(ref state); // ... code using myLookup ... }
26 March 2026