This is an android plugin to record videos from unity cameras or textures.
When using OpenGL api graphics, Unity does not provide an async operation to read back from gpu.
So, this plugin offers an alternative to that.
Notice that it requires OpenGL graphics api and it only supports Android.
Our motivation for writing this code was the lack of good tools to record the screen in Android AR apps, as ARCore runs on OpenGL and the best plugins we found in the Asset Store to record the screen perform poorly.
The MediaRecorderManager.cs script provides the interface you need to use the plugin:
- Initialize()
- Uninitialize()
- StartCapture()
- StopCapture()
- SetOutputFolder()
- GetOutputFilename()
The MediaRecorderPlugin.cs script handles the communication between Unity, java and native code.
Important notes:
- Vulkan api is not supported.
- Directx api is not supported.
- Only built-in rendering pipeline is supported
- Android minimum api level is 24
- .NET Standart 2.0 is supported
- Multithreaded Rendering is supported
- This package does not require any additional package
- The libs are provided as arm64-v8a, armeabi-v7a and x86