Settings in Unity Project
Add the below code in mainTemplate file
buildTypes {
debug {
jniDebuggable true
debuggable true
}
release {
debuggable true
}
}
The main template should look like this after addition.
Check development build toggle in build settings
Profiling in Unity Editor
Check AutoConnect Profiler and Deep Profiling Support in Build settings.
Build and Run in android device.
Run the App in device.
Open Profiler window in Unity Editor and the profiling results can be viewed in the window
https://docs.unity3d.com/Manual/profiler-profiling-applications.html
Profiling in Android Studio: