# Unity Systrace Plugin for Android
Unity profiler has a nice timeline view with named sections. It may be very helpful to have these sections displayed on a system-wide trace collected from an Android device using systrace tool, as it gives information about scheduling, CPU status, other processes running in the system etc. In version 2018.2, Unity introduced a profiler native plugin API; used together with Android tracing API, it allows to develop an integration plugin.
IMPORTANT NOTE: In Unity 2019.1, native systrace support has been introduced (with same functionality as this plugin). It means that starting from 2019.1, there is no need to use this plugin - everything should just work out of the box.
Few comments on the implementation:
Assets
directory to your project (it will be easier if you retain the path, then the plugin importer will set CPU architecture for the .so's correctly)Assets/Scripts/SystracePlugin.cs
script to a game object of your choice in your first scene to make sure the plugin is loaded as early as possibleRun ndk-build
in src/
directory of the repo. Grab the libraries in src/libs/
Licensed under Apache 2.0.
Unity Native Plugin API headers licensed under Unity Companion License, please see the header contents for details.