Unity is a versatile game engine that supports multiple graphics APIs on various platforms. Whether Unity uses OpenGL depends on the platform and the settings you choose for your project.
On desktop platforms like Windows, macOS, and Linux, Unity has traditionally supported both DirectX (on Windows) and OpenGL. However, OpenGL support could be phased out or replaced with newer APIs such as Vulkan or Metal (for macOS) as they offer improved performance and more modern features.
In earlier versions of Unity, OpenGL was often the default for Linux and macOS, while Direct3D was the default for Windows. Unity provided the choice to switch between graphics APIs if needed, but starting from Unity 2019.1, they introduced the new High Definition Render Pipeline (HDRP), which did not support OpenGL.
For mobile development, Unity also supports OpenGL ES, which is a subset of OpenGL tailored for embedded systems, including smartphones and tablets. Still, it's important to note that Unity is moving toward using Apple's Metal for iOS devices for better performance and compatibility, while on Android, Vulkan support is becoming more common.
Here's how you would typically set the graphics API in Unity:
Graphics APIs list.
Keep in mind that Unity automatically picks the most suitable graphics API for each platform unless you explicitly change the order or remove certain APIs from the list.
The trend in Unity development has been towards more advanced graphics APIs like Vulkan and Metal, especially given their compatibility with modern hardware and performance benefits. For the latest information on Unity's graphics API support, you should refer to the current Unity documentation or Unity release notes.