Documentation

Unity Engine

Download Unity

Unity Engine

EarlyUpdate

Player loop phase that processes input, loading, streaming, and other engine housekeeping before physics and scripts update.
Read time 5 minutesLast updated 6 days ago

Definition

public struct EarlyUpdate

Remarks

EarlyUpdate
runs after
Initialization
and before
FixedUpdate
. Systems in this phase process Editor and Player connection messages in development builds, present the previous frame on some platforms, run main-thread tasks and callbacks for web requests and GPU readbacks, process asynchronous loading and streaming, send
OnBecameInvisible
messages, resize canvases, read input for the legacy Input Manager and XR devices, call MonoBehaviour.Start() on scripts that haven't started yet, and reset interpolated Rigidbody positions before physics runs.
This struct identifies a phase of the Player loop. It has no members. In the default Player loop, the
PlayerLoopSystem
for this phase contains a PlayerLoopSystem.subSystemList of native engine systems, each identified by one of the structs nested in this type.
Use this type with PlayerLoopSystem.type to find the phase when you add your own systems to it, or when you reorder, replace, or remove the systems it contains. If you remove or replace a native system, Unity no longer performs that system's work, so the related engine feature might stop working. Some native systems are active only in the Editor, only in Players, or only on platforms and configurations that support the related feature. Elsewhere, those systems remain in the Player loop but don't do anything.

Structs

Struct

Description

EarlyUpdate.AnalyticsCoreStatsUpdateNative Player loop system that updates the core statistics that Unity Analytics collects.
EarlyUpdate.ClearIntermediateRenderersNative Player loop system that clears meshes drawn with Graphics.DrawMesh and similar methods at the start of the frame in the Editor.
EarlyUpdate.ClearLinesNative Player loop system that clears debug lines drawn with Debug.DrawLine and Debug.DrawRay once they expire.
EarlyUpdate.DeliverIosPlatformEventsPlayer loop system for delivering iOS platform events that's part of the default Player loop but performs no work.
EarlyUpdate.DispatchEventQueueEventsNative Player loop system that dispatches events from the global event queue, which native plug-ins can use to communicate with the engine and with each other.
EarlyUpdate.ExecuteMainThreadJobsNative Player loop system that runs engine background tasks that must complete on the main thread.
EarlyUpdate.GpuTimestampNative Player loop system that records the initial GPU timestamp for the frame, which GPU profiling uses.
EarlyUpdate.InsightsUpdateNative Player loop system that collects and sends diagnostic data about the application's sessions and runtime behavior.
EarlyUpdate.PerformanceAnalyticsUpdateNative Player loop system that measures frame times for performance reporting.
EarlyUpdate.Physics2DEarlyUpdateNative Player loop system that resets 2D physics profiling statistics at the start of the frame.
EarlyUpdate.PhysicsCore2DEarlyUpdateNative Player loop system that performs the early-frame update for the low-level 2D physics API in the Unity.U2D.Physics namespace.
EarlyUpdate.PhysicsResetInterpolatedTransformPositionNative Player loop system that resets interpolated Rigidbody Transforms to their simulated positions before the frame's physics updates.
EarlyUpdate.PlayerCleanupCachedDataNative Player loop system that releases unused cached rendering buffers and text rendering data.
EarlyUpdate.PollHtcsPlayerConnectionPlayer loop system for polling player connections that isn't part of the default Player loop.
EarlyUpdate.PollPlayerConnectionNative Player loop system that processes messages between the Editor and connected Players, such as Profiler and Console data.
EarlyUpdate.PresentBeforeUpdateNative Player loop system that presents the previous frame at the start of the frame, on platforms that present before the update.
EarlyUpdate.ProcessMouseInWindowNative Player loop system that updates whether the mouse cursor is inside the application window.
EarlyUpdate.ProcessRemoteInputNative Player loop system that processes input from the Unity Remote app.
EarlyUpdate.RendererNotifyInvisibleNative Player loop system that sends OnBecameInvisible messages to scripts on renderers that are no longer visible to any camera.
EarlyUpdate.ResetFrameStatsAfterPresentNative Player loop system that records the number of Animator components that played in the previous frame, and resets the count for the new frame.
EarlyUpdate.ScriptRunDelayedStartupFrameNative Player loop system that calls MonoBehaviour.Start on scripts that haven't started yet, such as scripts in newly loaded scenes.
EarlyUpdate.SpriteAtlasManagerUpdateNative Player loop system that cleans up invalid sprite atlases and requests late-binding sprite atlases from scripts.
EarlyUpdate.TilemapRendererEarlyUpdateNative Player loop system that releases render data for Tilemap Renderer chunks that are no longer used.
EarlyUpdate.UnityWebRequestUpdateNative Player loop system that invokes main-thread script callbacks for in-progress UnityWebRequest operations.
EarlyUpdate.UpdateAsyncInstantiateNative Player loop system that advances asynchronous instantiation operations, such as those started with Object.InstantiateAsync.
EarlyUpdate.UpdateAsyncReadbackManagerNative Player loop system that checks pending asynchronous GPU readback requests and invokes callbacks for completed requests.
EarlyUpdate.UpdateCanvasRectTransformNative Player loop system that updates the RectTransform of each Canvas to match its screen or camera before scripts update.
EarlyUpdate.UpdateContentLoadingNative Player loop system that advances content file loading operations, such as those started with the ContentLoadManager API.
EarlyUpdate.UpdateInputManagerNative Player loop system that reads the current state of input devices into the legacy Input Manager.
EarlyUpdate.UpdateKinectPlayer loop system for Kinect sensor updates that's part of the default Player loop but performs no work.
EarlyUpdate.UpdateMainGameViewRectNative Player loop system that updates the screen size to match the main Game view.
EarlyUpdate.UpdatePreloadingNative Player loop system that integrates asynchronously loaded scenes and assets, such as those loaded with SceneManager.LoadSceneAsync.
EarlyUpdate.UpdateStreamingManagerNative Player loop system that passes the cameras that mipmap streaming uses to calculate mipmap levels, such as cameras with active Streaming Controller components, to the mipmap streaming system.
EarlyUpdate.UpdateTextureStreamingManagerNative Player loop system that updates mipmap streaming and decides which texture mipmap levels to load.
EarlyUpdate.XRUpdateNative Player loop system that updates XR input and tracking data before scripts update.