authentication - 我可以在不使用 Photon 身份验证的情况下在 Unity 中创建登录系统吗?
问题描述
我在 Photon for Unity 中创建登录系统时遇到问题,我已经尝试过一切,我运行了整个谷歌并尝试了一切,但我总是有一些错误!在我最后一次尝试中,我在 Unity 控制台上遇到了这个错误:
Operation failed: OperationResponse 230: ReturnCode: 32755 (Custom authentication service error: Error). Parameters: {} Server: NameServer
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1623)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)
还有这个其他错误:
Custom Authentication failed (either due to user-input or configuration or AuthParameter string format). Calling: OnCustomAuthenticationFailed()
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1660)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)
所以我厌倦了使用 Photon Auth,想知道我是否可以在 Unity 内部创建一个登录系统,而不是 Photon,Photon 只会向其他玩家显示玩家的名字,以及其他正常的东西。仅在 Unity 上而不在 Photon 上进行身份验证是否存在问题?
解决方案
看看 WWWForm 的统一性,你将不得不做一些服务器端编程来将数据存储在数据库中,但使用 PHP 应该很容易。您必须编写一些 C# 代码来统一解析数据(作为字符串),然后再发布表单并在您取回对象时对数据进行排序。
推荐阅读
- android - 创建无法修改的文件android
- ios - 显示在表格视图部分标题顶部的编辑行操作
- excel - 如果单元格为空白,则查看下一张纸并复制
- elasticsearch - 日期字段值返回字符串而不是日期
- javascript - 按最近日期对数组进行排序,如果同一天则只放一个日期
- javascript - AngularJs ngClick 缓存更新问题
- python - WIN8 对话窗口在启用选项卡导航的情况下无法打开 - pyautogui
- dart - Flutter-ExpansionTile 在点击时展开和折叠
- javascript - 原型继承的正确方法
- java - java和actionscript类没有被嘲笑