Description

Runs the supplied parameterless action on Unity’s main thread and blocks the current worker until that action is complete. The method returns no value. Store required Unity data inside the action in a dedicated class field, then use that field after the call returns.

Synchronous hand-off

The current worker cannot continue until the main-thread action has finished.

Store values in fields

Assign values such as a Transform position to a class variable like Vector3 m_position.

Parameters

Returns

Code Example