Unity 5.5 + i2.Loc + Google Play = fatal crash

More
7 years 4 months ago #1923 by Kabicou
Hi,

the i2 Loc was working ok until i decided to move to Unity 5.5 (from 5.4.1) - which lead me to update the Google Play Games for Unity plugin ( github.com/playgameservices/play-games-plugin-for-unity/ )

it took me the whole day to figure out that there is a conflict between the two.

Symptoms:
- My platform is set to Android.
- If i build and run on Android device, i don't see problem.
- If i run my game in the Unity Editor the first time, nothing wrong happens. But when i click Play the second time (i mean the Editor Play button), Unity crash on a Fatal Error 100% time, with the following message:

No valid name for platform: 11
UnityEditor.BuildPipeline:GetBuildTargetName(BuildTarget)
UnityEditor.PluginImporter:GetCompatibleWithPlatform(BuildTarget) (at C:\buildslave\unity\build\artifacts\generated\common\editor\PluginImporterBindings.gen.cs:80)
Google.FileMetadataByVersion:EnableMostRecentPlugins()
Google.FileMetadataSet:EnableMostRecentPlugins()
Google.VersionHandler:UpdateVersionedAssets(Boolean)
Google.VersionHandler:.cctor()
GooglePlayGames.Editor.GPGSDependencies:RegisterDependencies() (at Assets\GooglePlayGames\Editor\GPGSDependencies.cs:110)
GooglePlayGames.Editor.GPGSDependencies:RegisterDependencies() (at Assets\GooglePlayGames\Editor\GPGSDependencies.cs:40)
GooglePlayGames.Editor.GPGSDependencies:.cctor() (at Assets\GooglePlayGames\Editor\GPGSDependencies.cs:34)
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(IntPtr)
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(RuntimeTypeHandle) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101)
UnityEditor.EditorAssemblies:ProcessEditorInitializeOnLoad(Type) (at C:\buildslave\unity\build\Editor\Mono\EditorAssemblies.cs:130)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes() (at C:\buildslave\unity\build\Editor\Mono\EditorAssemblies.cs:156)


I've created a fresh Project with just two languages, one term "test", and generated the script so that i can call it:

public class i2_crashTest : MonoBehaviour {

// Use this for initialization
void Start () {
Debug.Log(I2.Loc.ScriptLocalization.stats.test);
}

}


As soon as the game runs twice with that single script attached to a GameObject and that Google Play Games is installed, Unity crashes.

If i remove the Assets\PlayServicesResolver\EditorGoogle.VersionHandler.dll file, Unity does not crash. So there is a conflict here.

Do you see any way to solve this problem, as both "plugins" are tight to my current project?
I usually try to fix things by myself, and usually avoid plugins at all for this kind of reason, but here i'm stuck after having passed the whole day on this :/

Kind regards

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #1925 by Frank
Hi,
I tried an empty project in Unity 5.5.0f3 and installed the plugin you are referring:
GooglePlayGamesPlugin-0.9.35.unitypackage
which is in the current-build folder of the repository you linked.

However, without installing anything else (not I2 Localization nor any other script), I'm getting a compile error:

Assets/GooglePlayGames/ISocialPlatform/PlayGamesLocalUser.cs(27,18): error CS0535: `GooglePlayGames.PlayGamesLocalUser' does not implement interface member `UnityEngine.SocialPlatforms.ILocalUser.Authenticate(System.Action<bool,string>)'
Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs(41,18): error CS0535: `GooglePlayGames.PlayGamesPlatform' does not implement interface member `UnityEngine.SocialPlatforms.ISocialPlatform.Authenticate(UnityEngine.SocialPlatforms.ILocalUser, System.Action<bool,string>)'


I'm noticing that the package was built 2 months ago.

Do I have to install anything else to make that plugin work?
Is there a new version? Given that this package is from 2 months ago, I'm guessing is not yet compatible with unity 5.5

Have you tried running your project with just the google play plugin. Maybe you will get the same error even without I2 Localization installed.
Nonetheless, if you help me setup the plugin in an empty project, I will try checking and resolve any conflict asap.

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago - 7 years 4 months ago #1927 by Kabicou
Hi Franck,
thank you for the kick answer.

Indeed, you have a compile error that is known and have a fix on the github project, but you don't need to go through that: set your project to "Pc Max Linux..." and the error will go but the crash still occurs. (sorry i should have mention this about my blank project).

You can even remove everything from GPG but the Assets\PlayServicesResolver\ directory. (so remove Plugins and GooglePlayGames directories)

If i remove all references to i2 Loc i don't have the error (this in my main project and in two test project). And remember to Play it twice (the error can also occur when we import the Assets\PlayServicesResolver\ directory in the project (but it can be more difficult to reproduce)

Here's the VersionHandler class (from dll) that seems to trigger the problem:

Removed to try to post successfully


I hope this help ;)
Last edit: 7 years 4 months ago by Kabicou. Reason: typo

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #1928 by Kabicou
Additional info:
The crash also occurs with this more up-to-date version of PlayServicesResolver found here:
github.com/googlesamples/unity-jar-resolver

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #1931 by Kabicou
Kudos for the kick fix (i've tried the update as soon as i get the unity email alert) :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.275 seconds
Template by JoomlaShine