ข้อมูลสำคัญ

Unity has released MethodReload, an experimental package designed to accelerate iteration times by bypassing traditional domain reloads. This tool aims to reduce the waiting periods developers experience when tweaking gameplay code, both within the Editor and during device testing.

To utilize this feature, developers must tag specific public methods with the [MethodReload] attribute before entering Play Mode or building a player. The system then monitors these methods, allowing the running instance to incorporate updated code bodies immediately upon the next call.

The tool is currently available in the com.unity.pipeline package, version 0.7.0-exp.1, and requires Unity 6.0 or later. While it significantly speeds up small code tweaks, it does not entirely replace domain reloads, as larger structural changes still necessitate a standard compilation process.

Unity notes that MethodReload is an experimental feature, meaning the implementation process may evolve. Furthermore, tagged methods must return void or IEnumerator, as other return types are ignored during the build process.

อ่านรายละเอียดเพิ่มเติมได้จากต้นฉบับ