playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 965 forks source link

Remove hardcoded enforcement for RootPath property #2976

Open contatodoaleoliveira opened 3 years ago

contatodoaleoliveira commented 3 years ago

Resolves https://github.com/playgameservices/play-games-plugin-for-unity/issues/2510

The RootPath property on the GPGSUtil class was hardcoded as a direct child folder inside "Assets". This prevented the plugin to be organized inside subfolder or to be wrapped inside a custom Unity Package (all of those attempts would result in in "Plugin error: GooglePlayGames folder was renamed").

This pull requests fix that and adds a more reliable way of handling the project structure. The solution is inspired by https://github.com/playgameservices/play-games-plugin-for-unity/pull/2120 from @mirkoquaro.