VPS Mocklocalization functional?

  • ARDK version: ARDK 3.0 beta 4
  • Unity version: 2021.3.27f1

Description of the issue:
Hi Lightship community!

I’m trying to use the mocklocalization to act as a server in my multiplayer setup. The reason for this is that i’d like to have the host running for about 8 hours and to keep it from overheating i’d like to use mocklocalization and no AR features. But in order to connect other players to it i’ll have to use the lightship Netcode Transport.

All is going well with connecting players to a host the normal way but when i start mocklocalization i get the following error:

Now this is with the most simple sample scene i could make, simply calling this line:

_sharedSpaceManager.StartSharedSpace(
                ISharedSpaceTrackingOptions.CreateMockTrackingOptions(), 
                ISharedSpaceRoomOptions.CreateLightshipRoomOptions("roomname", 6, "description"));

I’m using netcode for gameobjects 1.4.0

My short question would be, is mocklocalization still supported or perhaps with a different package version?

Hi Merijn,

I appreciate your patience. Can you double-check your API key? It looks like this error occurs when there is a missing API key. Also, I see this was posted when Beta 4 was out. We recently came out with the full official release of ARDK 3 if you’re interested in upgrading, updating via the package manager should make your ARDK 3 version current.

Hello again Merjin!

Common disclaimer: I highly recommend updating to the most recent 3.o public release version to check if that resolves the issues you’re encountering. Should the problems remain, please don’t hesitate to post on these forums!

I can’t say we predicted this use case for MockColocalization! Clever! If your goal is to have a headless Unity server, I don’t think you necessarily need to use the SharedSpaceManager. Instead, you could call the API SharedSpaceManager uses, RoomManagementService. There’s two “GetOrCreateRoomAsync” overloads that I think can fulfill your use case.

Thanks again!

Hey @Jacob-Niantic ,

Thanks for the response, it was exactly what i was hoping for. I updated ardk and implemented it the following way:

async void SetupHeadlessRoom()
    {
        var result = await RoomManagementService.GetOrCreateRoomAsync(_sharedSpaceModel.RoomName, "", 10);
    
        if(result.Status == RoomManagementServiceStatus.Ok) 
        {
            Debug.Log($"created a new room: {result.RoomId}");
            RoomManagementService.GetRoom(result.RoomId, out var room);
            _sharedSpaceModel.NetcodeTransport.SetRoom(room);
            _sharedSpaceModel.NetworkManager.StartHost();
        } 
        else 
        {
            Debug.LogError($"something went wrong creating a room: {result.Status}");
        }
    }

Calling SharedSpaceManager.StartSharedSpace() with the same name then connects to it like expected. This setup makes our project way more stable since the host ipad can now run only the gamestate variables and won’t have any heating issues so we can run the simulation all day (though that still requires testing to be sure of course).

Thanks again!

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.