Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Unity Transport in standalone build

Discussion in 'Unity Transport' started by Tom-Kazansky, May 23, 2021.

  1. Tom-Kazansky

    Tom-Kazansky

    Joined:
    Mar 9, 2015
    Posts:
    61
    Hi!
    I'm trying to make a multiplayer game, using Unity Transport for communication between server and client.

    I followed the tutorial here: https://docs-multiplayer.unity3d.com/transport/0.8.0/samples/jobifiedserverbehavior

    I ran a standalone build and unity editor for testing.

    when I ran the standalone as client and unity edtior as server, there is nothing wrong... yet.

    when I ran the standalone as server and unity editor as client, I got this error:

    this log provided from "development build" log file.

    my code at that location: (I snipped other parts)
    Code (CSharp):
    1.  
    2.             ServerJobHandle = _driver.ScheduleUpdate();
    3.             ServerJobHandle = connectionJob.Schedule(ServerJobHandle);
    4.             Debug.Log("Last step  " + (_connections.IsEmpty));
    5.             ServerJobHandle = serverUpdateJob.Schedule(_connections, _connections.Length, ServerJobHandle);
    6.             Debug.Log("  Exit step");
    7.  
    I use Unity 2020.3.0f
    Unity Transport version is 0.8.0-preview.8

    by the way, I can't find interface IJobParallelForDefer so I use IJobParallelFor

    I only got this error when I run the standalone build as server, if I run Unity Editor as server, I don't get this error.

    I suspect building to standalone version messed up some code but I have no ideas where.., some related build settings are: scripting backend: IL2CPP, managed stripping level: Low

    Anyone know how to resolve this?

    Thank you for reading,
    Tom.


    EDIT: nevermind, I will use LiteNetLib for now.
     
    Last edited: May 27, 2021
    iclosed likes this.