Unity 的 Google 应用内评论未显示,未抛出错误

Vin*_*llo 5 android unity-game-engine google-play

我们按照本指南 ( https://developer.android.com/guide/playcore/in-app-review/unity ) 为 Unity Android 实施应用内审核。

我们添加了 google-play-core 统一插件,它应该在 Unity 中正确导入。

代码是:

private IEnumerator requireRate(){
    // Create instance of ReviewManager
    ReviewManager _reviewManager;
    // ...
    _reviewManager = new ReviewManager();
    var requestFlowOperation = _reviewManager.RequestReviewFlow();
    yield return requestFlowOperation;
    if (requestFlowOperation.Error != ReviewErrorCode.NoError)
    {
        // Log error. For example, using requestFlowOperation.Error.ToString().
        yield break;
    }
    PlayReviewInfo _playReviewInfo = requestFlowOperation.GetResult();
    var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);
    yield return launchFlowOperation;
    _playReviewInfo = null; // Reset the object
    if (launchFlowOperation.Error != ReviewErrorCode.NoError)
    {
        // Log error. For example, using requestFlowOperation.Error.ToString().
        yield break;
    }
    // The flow has finished. The API does not indicate whether the user
    // reviewed or not, or even whether the review dialog was shown. Thus, no
    // matter the result, we continue our app flow.
}
Run Code Online (Sandbox Code Playgroud)

当我们想要显示它时,我们调用协程:

StartCoroutine(requireRate());
Run Code Online (Sandbox Code Playgroud)

有什么建议吗?谢谢

AQu*_*ero 2

//Require..\nusing Google.Play.Review;\n\npublic void requestFunction()\n    {\n        StartCoroutine(requireRate());\n    }\n\n//somewhere in your code after completing the game ..\nrequestFunction();\n
Run Code Online (Sandbox Code Playgroud)\n

安装的程序包管理器:\n//Google Play 应用内审核

\n

在其他设备上进行测试,令我惊讶的是我的帐户它没有 \xe2\x80\x99 工作,原因未知,但我在内部 Google Play 控制台测试程序列表中的其他 3 个设备上进行了测试,并得到了非常积极的响应。

\n

正如文斯所说

\n