EvilMindDevs / hms-unity-plugin

The HMS Unity Plugin makes it easy to include Huawei Mobile Services into Unity-based games. Authentication, in-app purchases, push alerts, ads, and interaction with gaming services are just a few of the basic capabilities that this formidable tool makes available to your applications.
https://evilminddevs.gitbook.io/hms-unity-plugin/
305 stars 41 forks source link

请问有没有要使用这个插件接入华为的防沉迷功能应该怎么做? #464

Open NicolasTseJ opened 5 months ago

NicolasTseJ commented 5 months ago

找了一下好像没有相关的方法,没有搜到与防沉迷相关的方法名之类的

github-actions[bot] commented 5 months ago

Thank you for reporting this issue/advice.

We will get back to you as soon as possible.
Would you like to star our plugin to support us? :sparkles:

alihan98ersoy commented 5 months ago

In our plugin, we have Game Service:6.2.0.301. And in the SDK we have the related parts. PlayersClientWrapper.cs & IPlayersClient.cs

But we don't have an example of how to use it. In our roadmap, we are planning to update the Game Service to the latest version. With this update, we can create a demo for it.

For now, you can refer to Game Trial to integrate the feature.

NicolasTseJ commented 5 months ago

这个更新大概什么时候能完成呢?我们项目目前需要用到这个功能

alihan98ersoy commented 5 months ago

We plan to update by the end of February.

NicolasTseJ commented 5 months ago

防沉迷相关的方法是在插件里面已经有了是吗?我是可以自己根据(Game Trial)实现的对吗?

alihan98ersoy commented 5 months ago

Yes, but this feature is not available."The Game Service SDK of version 6.8.0.300 or later provides the function of automatically detecting minors' played time." resim

NicolasTseJ commented 5 months ago

好的,我试试先,感谢

NicolasTseJ commented 5 months ago

请问2.3.5对应华为的SDK是哪个版本,我按照官网的教程做了(playersClient.GetGamePlayer(true);),但是没办法弹出实名认证的窗口。

alihan98ersoy commented 5 months ago

I believe if the user already signed in there will be no display. did you write a debug? is the "IF" or "ELSE" condition triggering? resim

If the problem is not solved, maybe you can send me the logs then I can check the logs.

NicolasTseJ commented 5 months ago

这个是游戏试玩方法,已经被废弃了,而且它好像是试玩时间结束才会回调这两个方法。我需要的是当用户登录时,如果没有经过实名认证,就要弹出实名认证的窗口这个功能。该功能是否在当前插件版本是不支持的?目前2.3.5对应的是HUAWEISDK的V6.2.0.301版本吗?

alihan98ersoy commented 5 months ago

I will test and try to find a quick solution for you.

NicolasTseJ commented 5 months ago

ok, thx

NicolasTseJ commented 5 months ago

请问我在插件里面没找到这个方法(ResourceLoaderUtil.setmContext(this); // Set the game addiction prevention message context, which is mandatory.),是存在的吗?我看教程里面有说这个方法必须加

alihan98ersoy commented 5 months ago

Yes, there is no ResourceLoaderUtil. According to my tests, a few parts in SDK should be changed. Uploading GameServices to the latest version is a high priority for us.

alihan98ersoy commented 4 months ago

Hello, we have released the new version.