Search Unity

Question LobbyEventCallbacks can't use

Discussion in 'Lobby' started by First_Space_man, Feb 13, 2023.

  1. First_Space_man

    First_Space_man

    Joined:
    Apr 26, 2020
    Posts:
    9
    Hello! I make game and copy some realization from demo lobby.
    So in LobbyManager we have in Demo LobbyEventCallbacks which lay in packages. When I try write this class in my script LobbyManager is red cause can't see LobbyEventCallbacks. What I should do for fix it? Any idea will be good. Of course I have asmdef which contains Unity.Services.Lobbies
     

    Attached Files:

  2. UnityGarChar

    UnityGarChar

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    29
    Hello, First_Space_man!

    You can upgrade the Lobby package used in your project to version 1.1.0-pre.3 to resolve those errors!
    If that version is not visible in the Package Manager you can add it by adjusting your project's manifest.json file to include
    "com.unity.services.lobby": "1.1.0-pre.3" alongside the other packages. You can typically find that file at "MyProject" > Packages > manifest.json


    To add some color, with previous Lobby versions you would need to head to Edit > Project Settings > Player > Scripting Define Symbols in the Unity Editor and add UGS_BETA_LOBBY_EVENTS as a symbol to expose Lobby Events. That flow is no longer required

     
    Ludwell, Mj-Kkaya and First_Space_man like this.
  3. First_Space_man

    First_Space_man

    Joined:
    Apr 26, 2020
    Posts:
    9
    Hello mate! This is answer)
    When using the Events code in this sample, make sure your Editor Project Settings > Player > Scripting Define Symbols include: UGS_BETA_LOBBY_EVENTS and UGS_LOBBY_EVENTS
     
  4. Mj-Kkaya

    Mj-Kkaya

    Joined:
    Oct 10, 2017
    Posts:
    179
    "1.1.0-pre.3" answer is a real helped me.
    Thank you so much UnityGarChar.
     
    UnityGarChar and First_Space_man like this.