Показаны сообщения с ярлыком google play services. Показать все сообщения
Показаны сообщения с ярлыком google play services. Показать все сообщения

вторник, 24 ноября 2015 г.

Google Play Services and Google Analytics Uniy plug-ins issue resolved

Original is https://github.com/googleanalytics/google-analytics-plugin-for-unity/issues/51
It was a bit challanges and finaly resolved
My configuration is:
Unity 5.1.2
play-games-plugin-for-unity 0.9.27
google-analytics-plugin-for-unity v4
latest SDK; Google Play services 28 (actually, plugin reports 8.1+)
Installation sequence was: google-analytics then play-games
When setup google-analytics-plugin-for-unity on Unity (Menu "Google Analytics-> Setup". it makes a copy google_play_services_lib into Assets\Pluins\Android directory
at this moment Google Analytics works fine.
After installation of play-games plug 0.9.27 google_play_services_lib directory disapear.
It caused by play-games plug. It found and imported dependences, and clean up Assets\Pluins\Android dictionary removed a "big" library google_play_services_lib. I assume? if i can add depencency for Google Analytics and it does! Both GPGS and GA work perfect.
FIX:
Locate file \Asstes\GooglePlayGames\Editor\BackgroundResolution.cs 
Find selfdescriptive method and add C# lines
    private static void AddDependencies()
    {
     ....
     svcSupport.DependOn("com.google.android.gms", 
     "play-services-analytics",      PluginVersion.PlayServicesVersionConstraint); 
    }
after that
play-games-plugin-for-unity imports play-services-analytics-8.3.0.aar into Assets\Plugins\Android
as well as other nessesary *.aar files