The legacy GUI system has been replaced with the new UI System. The legacy GUI is still functional but is not recommended to use in your game or application. The legacy GUI system is still used in Unity’s own interface and can be used to create custom editor GUI.
The legacy GUI allows you to create a wide variety of functional GUIs using code. Rather than creating a GUI object, manually positioning it, and then writing a script that handles its functionality, you can do everything at once with just a few lines of code. The code produces GUI controls that are instantiated, positioned and handled with a single function call.
This section explains how to use GUI both in your game and in extensions to the Unity editor.