M
M
MarioKrut2020-06-05 13:35:58
C++ / C#
MarioKrut, 2020-06-05 13:35:58

Top Ranking in Unity?

I made top rating in unity here is the code

using UnityEngine;
using System.Collections;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;

public class test : MonoBehaviour
{

  void Start (){
    PlayGamesPlatform.Activate();
  }

  void vhod (){
    Social.localUser.Authenticate((bool success) => {

    });
  }

  void dostijenie() {
    Social.ReportProgress("CgkI2pnKuuEFEAI---", 100.0f, (bool succes) => {

    });
  }

  void opublik(){
    Social.ReportScore(12345, "CgkI2pnKuuEFEAI---", (bool succes) => {

    });
  }

}

But the program throws the error

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0)
UnityEditor.GameObjectInspector.OnDisable () (at <480b5a3bd3214ce5831f6cdd5c68:
UnitEditor.Database:UnitEditor.fd0 ) Refresh()
GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:102)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])

I'm new to Unity! Please provide an explanation!
(I googled)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-06-05
@DanielMcRon

And what they googled gives an error in the GPGSUpgrader file in the Editor folder, see the error there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question