Search Unity

Question Getting namespace name 'Multiplay' does not exits error during android build

Discussion in 'Game Server Hosting' started by ZeusK10, Mar 17, 2023.

  1. ZeusK10

    ZeusK10

    Joined:
    Jun 29, 2021
    Posts:
    1
    Multiplayer.png
    To achieve functionality as shown in image, I was able to use matchmaker to allocate and join player to a running session or a new server session but I found the matchmaking process to be unreliable (maybe i did it wrong). When I matchmake in Game1, matchmaker sometimes creates a new server even though there is enough available slots in running session (I have backfill enabled) and sometimes it joins a session for game2 even when i clearly selected game1 (i think it has something to do with relaxations but i get error when i remove it so idk what else to do). So how do I properly implement matchmaker to get the result as shown in the image?

    I also want to know if it is possible to join players to the server when they start the game and create/join the lobby for each game session to achieve this functionality?

    My game also builds fine when i build in windows but when i try to build with android, i get this error: error CS0234: The type or namespace name 'Multiplay' does not exist in the namespace 'Unity.Services' (are you missing an assembly reference?).
    I have tried re-installing multiplay package and also tried regenerating project files with git packages enabled in external tools.
     
    Last edited: Apr 3, 2023
    Ariba2000 likes this.
  2. Ariba2000

    Ariba2000

    Joined:
    Jan 26, 2019
    Posts:
    1
    the solution on this link might be helpful.
    it's the same problem.
     
  3. ANLevant

    ANLevant

    Joined:
    Jun 10, 2014
    Posts:
    28
    TL;DR: Multiplay module isn't exported into android builds, wrap your Multiplay code with #if UNITY_SERVER #endif to only be present when compiling game servers