Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Project Cloner for multiplayer testing

Discussion in 'Multiplayer' started by hwaet, Nov 11, 2018.

  1. hwaet

    hwaet

    Joined:
    Mar 21, 2015
    Posts:
    26
    cloner.png
    A long while ago, someone on the unity subreddit shared a cool tip for cloning unity multiplayer projects. Rather than constantly building things for testing out a project, one can create a duplicate project and use sym links to make the original project's code apply to both. With the new multiplayer system I decided to make a little editor shortcut to save me some time. It's here if you'd like to use it:

    https://github.com/hwaet/UnityProjectCloner
    (it's tested on PC only, sorry mac friends!)

    Additional caveat: The auto build system that the sample FPS project uses seems awesome and is probably a way better solution than this when it comes to testing a lot of clients at once. But for people just starting out with multiplayer coding, it's really helpful to see both of the editors live.
     
    KnightWhoSaysNi likes this.
  2. KnightWhoSaysNi

    KnightWhoSaysNi

    Joined:
    Jan 21, 2017
    Posts:
    13
    This is awesome! Thanks for sharing
     
  3. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    It's easier to create fake clients :)

    Fake client - a client that connects to the server without actually connecting it.
     
  4. Todiloo

    Todiloo

    Joined:
    Jan 22, 2016
    Posts:
    53
    Does this have any features that https://github.com/VeriorPies/ParrelSync does not?

    Do you have any examples on how to do this? I do something similar for my AI in mirror, I just create a networkbehaviour that is controlled on the server.
     
  5. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168

    I have an event on the OnConnected server, in which I perform a request for client information, and actions to authorize it.
    Instead of connecting a new client, I emulate the connection of the client, the OnConnected event is also called, but without the actual connection of the client (no connections occur), it exists and is controlled only on the server side.
     
    Todiloo likes this.