Navigation

    Colyseus
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. yty
    yty

    yty

    @yty

    Chat Follow Unfollow
    0
    Reputation
    2
    Posts
    128
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Continue chat with yty
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    yty Follow

    Posts made by yty

    在客户端(U3d)用OnMessage("*",...)接收来自服务器的消息和广播均无效...

    https://docs.colyseus.io/colyseus/server/room/#public-methods

    this.onMessage("*", (client, type, message) => {
    console.log(client.sessionId, "sent", type, message);
    }
    

    如文档所描述,会排除已经注册的,但实际测试下来无效。colyseus 14.20+unity2021.3

    0_1669953295448_14caa51f-46bb-4c37-b619-82b88210836a-image.png

    posted in 中文 •
    请问在客户端(Unity3d)要如何使用LobbyRoom?

    在u3d中定义Room要用泛型的方式。
    private static ColyseusRoom<LobbyRoom> _room = null;

    但客户端中并没有定义LobbyRoom这个类,在文档中有看到,“LobbyRoom 将改为使用 state.@filter()”
    但也找不到定义的State,不清楚是取消了吗?也就是要自己去Schema去实现?

    public partial class MyRoomState : Schema

    posted in 中文 •