Play-games-plugin-for-unity: GooglePlayGames.Editor.GPGSUpgrader:.cctor() causing errors.

Created on 7 Apr 2020  路  4Comments  路  Source: playgameservices/play-games-plugin-for-unity

Hey,
I imported the "GooglePlayGamesPlugin-0.10.08" unity package today and now I get errors when I press play.
I use Unity 2019.3.2f1.
The errors can be ignored since they don't break anything and don't trigger the "Error Pause" functionality, but they are of course frustrating to have.

If I have any object selected in the scene hierarchy I always get this error:
GPGSU hierarchy

Having any asset selected in the Assets folders will also cause editor errors, but different ones depending on what type of asset it is (script, audio, prefab, etc).
GPGSU script asset
GPGSU audio asset

Regardless of what type of error it is, it always originates from the
UnityEditor.AssetDatabase:Refresh() call made in GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:102)

I understand that these are Unity errors from editor functions, but they are caused by how google play services is using them, because I can call things like AssetDatabase.Refresh(), myself without any issues.

Related issues:
https://github.com/playgameservices/play-games-plugin-for-unity/issues/2057
https://github.com/playgameservices/play-games-plugin-for-unity/issues/1713

bug

Most helpful comment

This also leads to the question why AssetDatabase.Refresh() is called every single time, even if no actual upgrade was performed. Since this code is also executed when entering playmode it has a very negative impact on the time it takes to enter playmode in large projects. Please also make the logging in this code configurable or only log when an actual upgrade is performed.

All 4 comments

Same on Unity 2019.3.10f1.

I tried setting Selection.activeGameObject to null before that Refresh, that didn't work.

I want to comment that line but I'm not sure of the effects of doing that...

This also leads to the question why AssetDatabase.Refresh() is called every single time, even if no actual upgrade was performed. Since this code is also executed when entering playmode it has a very negative impact on the time it takes to enter playmode in large projects. Please also make the logging in this code configurable or only log when an actual upgrade is performed.

This happens also on 0.10.07 and Unity 2019.2.0b7

Same problem

Was this page helpful?
0 / 5 - 0 ratings