question

g7l12k11n14 avatar image
g7l12k11n14 asked

icant Playfab Multi-server build

I use /// Mac M1 unity2021.3.20f1 mirror78.30 playfabSDK2.163.230403

https://www.youtube.com/watch?v=YTNdsvTBEcA

https://github.com/PlayFab/MpsSamples/tree/main/UnityMirror

Assets/ScriptsC/UnityNetworkServer.cs(59,30): error CS0115: 'UnityNetworkServer.OnServerConnect(NetworkConnection)': no suitable method found to override

Assets/ScriptsC/UnityNetworkServer.cs(76,30): error CS0115: 'UnityNetworkServer.OnServerError(NetworkConnection, Exception)': no suitable method found to override

Assets/ScriptsC/UnityNetworkServer.cs(83,30): error CS0115: 'UnityNetworkServer.OnServerDisconnect(NetworkConnection)': no suitable method found to override

私は英語が得意ではありません。 私は上記のサンプルを使ってPLAYFABマルチサーバーをビルドしたいのですが、うまくいきません。 エラーの解決法や初心者でもわかりやすい、1からわかりやすいドキュメントはありますか? 公式のドキュメントはよくわかりません

I'm not good at English. I want to build a playfab multiserver using the above sample, but it doesn't work. Is there a solution to the error or any 1-to-fly documentation that is easy for beginners to understand? I'm not familiar with the official documentation

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Simon Cui avatar image
Simon Cui answered

Based on the error message mentioned, I recommend verifying that the UnityNetworkServer.cs file inherits from the parent class NetworkManager, as shown in the sample: UnityNetworkServer.cs should include the line "public class UnityNetworkServer : NetworkManager".

To learn about developing a multiplayer game using Unity Mirror, you can refer to the Mirror Networking - Mirror (gitbook.io) tutorial. After that, you can integrate PlayFab Unity GSDK into your project using our sample code: MpsSamples/UnityMirror at main · PlayFab/MpsSamples · GitHub. To run the project locally, please follow the instructions provided in the Locally debugging game servers and integration with PlayFab - PlayFab | Microsoft Learn.

Once you have successfully built and tested the project locally, you can host it on the PlayFab Multiplayer Server. For information on hosting multiplayer games using PlayFab Multiplayer Server, please refer to the Using PlayFab Multiplayer Servers to host multiplayer games - PlayFab | Microsoft Learn.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.