Open Honikou opened 7 years ago
Which version of Unity are you using? I think this is a known issue with 5.3. As you point out, it is harmless, but annoying. If you can't update Unity, you could safely comment out the call to AssetDatabase.Refresh in GPGSUpgrader.
Thank you for your answer Clay
I'm on 5.6.0f3
I comment but I still have an error, and if I click on the error nothing open.
NullReferenceException: Object reference not set to an instance of an object UnityEditor.Editor.get_referenceTargetIndex () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:162) UnityEditor.AssetImporterInspector.get_referenceTargetIndex () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/AssetImporterInspector.cs:25) UnityEditor.Editor.get_target () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:148) UnityEditor.AssetImporterInspector.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/AssetImporterInspector.cs:79) UnityEditor.AssetDatabase:Refresh() Google.PackageManager.ProjectManagerController:EnsurePluginsDirectory() Google.PackageManager.ProjectManagerController:.cctor() UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
I can't reproduce your issue, but I do know there has been some updates to the jar resolver. When you have a chance, can you update to the latest version of the plugin and see if that fixes it? You might need to restart Unity to make the DLLs unload and reload correctly... Thanks!
Thank you for your answer ! Ok I will test that asap.
Hi, I encountered the same issue today : NullReferenceException: Object reference not set to an instance of an object UnityEditor.UI.GraphicEditor.OnDisable () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/GraphicEditor.cs:27) UnityEditor.AssetDatabase:Refresh() GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:110) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
Plugin version 0.9.39a
Unity version : Version 5.6.0f3 (497a0f351392) Personal Wed, 29 Mar 2017 22:26:44 GMT Branch: 5.6/release
Don't know if this helps but I Had this same issue with the Facebook SDK for Unity (version 7.10.0)
It happened after I turned off logging in the facebook settings -> fb.init settings. Turning logging back on fixed the problem.
Came across this today. This error started showing up after initialising SDK as shown here.
I am getting the same error after importing the Google Play Services. It does appear benign, but would be great to get rid of. This is with the latest version of the plugin and Unity 2017.2.0f3.
NullReferenceException: Object reference not set to an instance of an object UnityEditor.Editor.get_referenceTargetIndex () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:162) UnityEditor.Experimental.AssetImporters.AssetImporterEditor.get_referenceTargetIndex () (at /Users/builduser/buildslave/unity/build/Editor/Mono/ImportSettings/AssetImporterEditor.cs:25) UnityEditor.Editor.get_target () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:148) UnityEditor.Experimental.AssetImporters.AssetImporterEditor.OnDisable () (at /Users/builduser/buildslave/unity/build/Editor/Mono/ImportSettings/AssetImporterEditor.cs:84) UnityEditor.AssetDatabase:Refresh() GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:114) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
Me too. 2017.1.2f
Also encountering this issue with Unity 2017.3.1p2
also occuring with unity 2017.3.1.f1 personal and GooglePlayGames plug-in version 0.9.50
Present in 5.6.5f1 as well. GPGS 0.9.50
I'm also encountering this issue.
NullReferenceException: Object reference not set to an instance of an object UnityEditor.InspectorWindow.OnSelectionChange () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:147) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:295) UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:288) UnityEditor.HostView.OnSelectionChange () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:168) UnityEditor.AssetDatabase:Refresh() GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:114) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
Unity 2017.4.4f1 GPGS 0.9.50
Update:
I was using PlayServicesResolver v1.2.61.0. I've just replaced it with v1.2.69.0 and that NullReferenceException message disappears.
I was too fast.
I was using PlayServicesResolver v1.2.61.0. I've just replaced it with v1.2.69.0 and that NullReferenceException message disappears.
It was true. I was even careful that I closed Unity and re-opened it, still worked. But then today, I opened Unity, running my game in the Editor and seeing that message again. Argghh.
phonggenix. did you solve it? i m having the same problem.
@alkubo I didn't do anything but today the message just disappears :/
Hi! I was updating achievements and leaderboards before sign in completed, now I call it after a successful login. Now I don't have the error anymore.
Hello !
It's been 3 year already. 😞
In GPGSUpgrader.cs, add thoses lines in the constructor
/// <summary> /// Initializes static members of the <see cref="GooglePlayGames.GPGSUpgrader"/> class. /// </summary> static GPGSUpgrader() { #if UNITY_EDITOR if (EditorApplication.isPlayingOrWillChangePlaymode) return; #endif
I can see why this constructor needs to be called after each Editor reload. But it makes much less sense when entering play-mode.
I'v been using the plugin without trouble using this fix. But with each update it comes back. Can we see this change in the next release of this SDK ?
Cheers ! 🎉
@bhallionOhbibi Hi! If you fixed that for you, why don't you create a PR?
Looks like my past self already did it: https://github.com/playgameservices/play-games-plugin-for-unity/pull/2891
My bad. This issue should be closed.
I don't know if it's related but I still get this error even after #2891
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at <2f1c602eae0d45c293fff3e3aef759fa>:0)
UnityEditor.GameObjectInspector.ReloadPreviewInstances () (at <2f1c602eae0d45c293fff3e3aef759fa>:0)
UnityEditor.GameObjectInspector.OnForceReloadInspector () (at <2f1c602eae0d45c293fff3e3aef759fa>:0)
UnityEditor.AssetDatabase:Refresh()
GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:104)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])
That issue was resolved in 9.35, but still present in 9.37
My plugin works well but that is boring to see this error everytime
In GPGSUpgrader AssetDatabase.Refresh();
ullReferenceException: Object reference not set to an instance of an object UnityEditor.UI.ImageEditor.OnDisable () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/ImageEditor.cs:69) UnityEditor.AssetDatabase:Refresh() GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:110) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()